-
Notifications
You must be signed in to change notification settings - Fork 283
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
Lighter webp is a lot slower than png #1647
Comments
@LasterAlex Locally, there is almost no delay in data transfer, but image optimization introduces its own latency. That's why you're seeing these results. It’s more important to check the outcome under simulated network throttling (using the network tab in DevTools) or to test it on a real server. However, keep in mind that on the server side there will also be time costs for processing and optimizing images, although they will most likely be less than transferring a large original image. If you want to achieve ideal performance on the server side as well, it can be a good idea to add browser caching headers (such as |
Thanks for the response!
I already did, that's why i saw it in the first place.
So... The method to fix slow I run my server by just All the settings in the repo are default, created by |
@LasterAlex I’d like to clarify that I’m not a From my perspective, using caching to reduce server load is a perfectly valid approach. If that’s not convenient for you, or if you find the image optimization speed unsatisfactory, there are build-time solutions like Regarding optimization speed: I agree with you that there can be performance problems. Personally, I’ve noticed more issues when creating By default, But once again — I’m not a |
I've tried to use
webp
format to make loading big images faster, but it seems thatwebp
is a lot slower than the same file inpng
when accessed from the_ipx
path (or if accessed withNuxtImg
):http://localhost:3000/_ipx/_/fractal.png produces a ~60ms wait:
http://localhost:3000/_ipx/_/fractal.webp produces a ~400ms wait:
format="webp"
also doesn't do better... http://localhost:3000/_ipx/f_webp/fractal.png produces a ~400ms wait:It is even cached, and most of the time it's just connecting.
If i request a raw file from http://localhost:3000/fractal.webp it gives the cached file in no time:
Dev or production mode, nightly or stable, firefox or chrome doesn't matter, it's still a lot slower.
Repo to reproduce (it's really just a few files in the
public
directory): https://github.com/LasterAlex/nuxt_bad_webpAm i doing something stupid? Is this expected? A lot of sources encourage the use of
webp
for optimization, so it's kind of confusing to see that the nuxt-image path is both slower than the raw public file AND slower than the less compressed file format.Thank you for your time in advance.
The text was updated successfully, but these errors were encountered: