Closed jgero closed 3 years ago
Here is a example from the documentation of sharp on how to convert something to WebP. Together with the resizing example of the previous comment it can be implemented.
Image Magick can do it too, but for some reason 'convert', [tempFilePath, '-quality', '80', '-resize', '800x550^', '-gravity', 'center', tempFilePathConverted]
fails.
When loading images for the overview of some image cards requesting and showing the full size images is way overkill and increases loading times. The better option would be to generate 2 images in the cropping function, one "full size" one, and a preview one.
Then it would be possible to request a adequately sized image for the current need in the frontend. Creating different directories in the bucket for raw, full sized and preview versions of the image would also enable more fine grained access rules.
Loading times could be decreased even more by converting images into a better compressible and better suited web-image format.