Skip to content

Lighter webp is a lot slower than png #1647

@LasterAlex

Description

@LasterAlex

I've tried to use webp format to make loading big images faster, but it seems that webp is a lot slower than the same file in png when accessed from the _ipx path (or if accessed with NuxtImg):

http://localhost:3000/_ipx/_/fractal.png produces a ~60ms wait:
Image

http://localhost:3000/_ipx/_/fractal.webp produces a ~400ms wait:
Image

format="webp" also doesn't do better... http://localhost:3000/_ipx/f_webp/fractal.png produces a ~400ms wait:
Image

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:
Image

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_webp

Am 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions