jonge-democraten / website

JD website
https://jongedemocraten.nl
MIT License
6 stars 2 forks source link

Improve header image responsiveness and filesize #212

Closed bartromgens closed 6 years ago

bartromgens commented 6 years ago

Use the mezzanine thumbnail tag to resize header images to a width of 2500 pixels and a jpeg quality of 75.

Images are automatically resized, but only if the size does not yet exist.

This fixes gray areas on the right and left of the header on large/high-res screens by upscaling images. And fixes possible large image file sizes.

Typical header image size will now be 100-300 kB.

Downside is a possible quality loss due to upscaling, but this is only really visible on wide screens and better than a gray area, in my opinion. Moreover, images that were already highly compressed will now become a bit bigger. I think this is acceptable.

Pi2048 commented 6 years ago

This looks good! Was there anything in specific on which you wanted to hear my thoughts?

bartromgens commented 6 years ago

Was there anything in specific on which you wanted to hear my thoughts?

Nope, just a general sanity check :) and to make sure you know what changes.