Handling image sizes without turning every upload into manual work

Clients keep uploading enormous phone photos to a small site. I can resize the display in CSS, but that obviously doesn't stop the browser from downloading a multi-megabyte original. I want a workflow that makes sensible responsive sizes and a modern format automatically, with the original available if needed. The sites aren't large enough to justify a complicated image service. Are you handling this at upload time, in the build step, or through an image proxy?

  • webdev
  • handling
  • image
  • sizes
27

5 replies · Sort: Best

Best
  1. PH
    quietorbit
    4 points

    4 replies

    If the site is small, I’d handle it at upload time or build time, not with a fancy proxy. Generate a few sensible sizes, make WebP or AVIF i...

    44 replies

    If the site is small, I’d handle it at upload time or build time, not with a fancy proxy. Generate a few sensible sizes, make WebP or AVIF if you can, and keep the original tucked away somewhere safe.

    4
    1. zhong96
      3 points

      That’s how we do it on a tiny client site. The browser only gets what it needs, and nobody has to think about the giant original every time.

      3
    2. AA
      abril.moll
      4 points

      I’d still leave the original available, but I wouldn’t serve it by default. People upload huge phone shots and then wonder why the page crawls.

      4

        Build step is my preference if the uploads are controlled. If clients are dropping files straight into the site, upload-time processing is l...