umbraco 12 - webp
# help-with-umbraco
p
Hi we are on umbraco 12 I was looking for guidance how to enable serving webp images for website visitors, backend users upload png, but havnt found much, does anyone has anything usefull to share?
d
Hi there! If you want to serve webp images, you can adapt your crop urls as follows:
Copy code
myImage.GetCropUrl(width:100, height:100, furtherOptions: "&format=webp")
This would serve
myImage
in size 100x100 and in webp format
Keep in mind that webp images don't work on safari browsers yet, so if you want to support safari browsers, you need to have a fallback in a different format
c
WebP works fine in Safari these days (since Safari 16, ~ September 2022 and before that requiring macOS 11)
d
Ah, you are right, my bad
p
Thanks! Yes I think webp is working for almost everyone these days.
a
Just a thing I noticed, it seems rather server CPU intensive to make the first conversion
When I changed the resolution on my site, I had to wait quite long for the site to come up :P..
e
See the post by Kamil on how to make all images on the site convert to webp by default: https://our.umbraco.com/forum/using-umbraco-and-getting-started/109299-umbraco-10-webp-file-much-larger-than-png#comment-339098
9 Views