V8-archive: Support WebP file format

Created on 8 Sep 2018  Â·  8Comments  Â·  Source: directus/v8-archive

:rotating_light: MIGRATED FROM REQUESTS.GETDIRECTUS.COM :rotating_light:

Support WebP file format

:+1: = 1

Created 6 months ago by @apexJCL


@apexJCL – :+1: (6 months ago)

Maybe the feature at all it's not that significative because the format isn't widely supported (requiring polyfills for Safari and other browsers), but it surely helps when you're developing a landing site that requires high quality pictures but with the lowest size possible.

By now, webp files can be uploaded/requested, but previews aren't available at all in tables/thumbnails or similar.

enhancement

Most helpful comment

Maybe work this into the thumbnails endpoints?

I don't hate that idea! Would be very useful if the thumbnailer could not only change sizes, but also convert to different formats. Would be awesome if you could upload one master huge PNG file, which you can then use on the front-end in both jpg, png, and webp formats (or whatever format you require)

All 8 comments

I guess the first step towards this is the how php could do this. And here are a couple of libraries:

Both have nice fallbacks in case some option is no available.

And the second question is how we should serve it?
First could be a explicit call with the thumbnailer (defining extension) or automatic serving by detecting the header. The first option requires the developer to use the picture+source element and the second it's seamless for everyone.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is available via Intervention Image:

Encode: $webp = (string) Image::make('public/foo.png')->encode('webp');

This should be high priority for anyone looking for the performance perks of next gen formats (It will also make Google Lighthouse happy.

Maybe work this into the thumbnails endpoints?

Maybe work this into the thumbnails endpoints?

I don't hate that idea! Would be very useful if the thumbnailer could not only change sizes, but also convert to different formats. Would be awesome if you could upload one master huge PNG file, which you can then use on the front-end in both jpg, png, and webp formats (or whatever format you require)

878

To achieve better clarity/visibility, we are now tracking feature requests within the Feature Request project board.

This issue being closed does not mean it's not being considered.

... NEW PR = #1001 🚀

Whoa, thanks @brocgailit!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdwmhcc picture cdwmhcc  Â·  3Comments

24js picture 24js  Â·  3Comments

vuhrmeister picture vuhrmeister  Â·  3Comments

ondronix picture ondronix  Â·  3Comments

metalmarco picture metalmarco  Â·  3Comments