Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeffrey Weinstein 67 posts 313 karma points
    Nov 20, 2022 @ 20:33
    Jeffrey Weinstein
    0

    Turning all images to WebP

    I'm debating if its easy/worth while to turn all image requests to webp extensions (foobar.webp) and than somehow rewrite back to original path (so file is found) and add to the end of querystring paramter for ImageSharp to make it webp format.

    This is what I'm thinking:

    1. Given in umbraco media section i have image /media/some-old-image.jpg
    2. When I will be serving this image via cshtml I would change extension to webp
    3. Than I would add rewrite rule for webp images to rewrite url to jpg
    4. And add query string for imagesharp to output image as WebP

    Does this makes sense? Or is there some better way, to turn all images currently inside Umbraco to WebP format?

  • Yakov Lebski 553 posts 2117 karma points
    Nov 21, 2022 @ 05:17
  • Jeffrey Weinstein 67 posts 313 karma points
    Nov 21, 2022 @ 15:49
    Jeffrey Weinstein
    0

    nice, thanks! is it open source?

  • Yakov Lebski 553 posts 2117 karma points
    Nov 21, 2022 @ 16:09
    Yakov Lebski
    1

    Yes, I'll push source shortly

  • Jeffrey Weinstein 67 posts 313 karma points
    Dec 20, 2022 @ 01:15
    Jeffrey Weinstein
    0

    still no github?

  • Yakov Lebski 553 posts 2117 karma points
    Dec 20, 2022 @ 04:27
  • Chris Van Oort 110 posts 370 karma points
    Aug 11, 2023 @ 14:54
    Chris Van Oort
    0

    Awesome, thank you! This made the process very easy for us. One small suggestion would be to use Github releases so it's easy to see which versions are out there and then merge v2 or v1.0.2 into the main branch. Or just see if you can set either of those as the default branch. When you click on the link you provided it wasn't immediately obvious to me that there was any source code posted at all.

Please Sign in or register to post replies

Write your reply to:

Draft