Dynasty Scans Image Proxy by Nanoskript
As of 4 May, 2024, Dynasty Scans now serves images in the WebP format which means you may no longer see any benefit in using this userscript.
This userscript loads chapter images and image posts from an image proxy server that compresses the images before sending them to your browser. Depending on how far away you are from Dynasty Scans' servers (which are located in Europe), this may significantly improve image loading times and reduce the amount of data you use.
Furthermore, the proxy operates behind Cloudflare which caches the compressed images. This means requesting the same image more than once is near instant for everyone.
Installation instructions:
1. Install the Tampermonkey extension for your browser.
2. Click here to download the userscript.
3. Click on install.
4. You're done!
This userscript also adds a Preload
button that loads all the images for a chapter in the background:
The image that is currently loading is colored in blue. Images that have been preloaded are colored in green. If you just want the preloading functionality without using the image proxy, here is the preloading script in the bookmarklet format:
javascript:(async()=>{for(let e=0;e<pages.length;++e){let l=document.querySelector(`a[href="#${e+1}"]`);l.style.fontWeight="bold",l.style.color="slateblue",await fetch(pages[e].image,{mode:"no-cors"}),l.style.color="green"}})();
Notes:
- The images are not compressed losslessly. This means there may be very minor image degradation compared to the original images.
- The image proxy server is hosted and operated by me. You can check if the server is online by checking if this page loads.
Benchmarks:
On average, loading an image with the proxy can be:
- ~3 seconds faster if you are located in the Asia-Pacific region.
- ~0.5 seconds faster if you are located on the US east coast.
These results are highly dependent on your location and the strength of your internet connection. On average, the file size of the compressed images can be up to ~3x smaller with little impact to quality though this is highly dependent on the image.
Contact:
- GitHub project page.
- Feel free to message @nanoskript
on Discord if you have any questions!
last edited at May 3, 2024 8:00PM