-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization Python script #443
Comments
I made it mostly for the square previews, those seem to be the biggest problem on my side |
Interesting piece of code. Although existing previews are overwritten on file changes. I'll try to give it a test and might add it to the readme. |
Yeah, that's a problem. I have a lot of storage, so I rsynced the whole previews folder beforehand for safety. Had no trouble though I have by now simplified it, because it was a little bulky. It also asks for the path to the previews: |
Do you mean you recompress existing previews using the quality settings in the script? Is this different to setting jpeg and webp quality in config.php? |
Yes, basically they're recompressed, with different settings. The difference is, it's more granular: the smaller the image, the more it gets compressed, because it's usually also viewed on a smaller screen, and it doesn't matter as much. It also compresses to progressive. I have problems with upload bandwidth at the server location, so ever bit counts. This way, even if it loads slowly, there will be an image available during loading. I don't think it's worth the hustle otherwise, but it's logic would make sense in Preview pre-Generators It doesn't work on webP, when I wrote it webP wasn't yet integrated. Is it now? I can't really find something like that. |
Thanks. It is a useful tool. It saves bandwidth for mobile users too. As for WebP, you need to enable the Imaginary support in Nextcloud and also run a Imaginary daemon. |
Hey, I'm quite new to GitHub, so I dont really know how to do this, but I wrote a little script to make the Previews load a little Faster:
I'm sure its not optimal, but it does speed up significantly, since I don't have a huge Upload speed and am behind a firewall with a badly optimized reverse proxy. AVIF Previews would probably be better, but this works now.
It relies on ImageMagick, jpegoptim and pngquant.
If this is the wrong place to post this, Im sure some kind stranger will tell me where to put it.
The text was updated successfully, but these errors were encountered: