Open ilicmarko opened 5 years ago
Generated placeholder images have a forced jpg file format. Here is an example
jpg
This is a PNG image that has been converted to JPG and gets a black background. This "looks" wrong when it loads.
I find a bit of code that forces a JPG format. https://github.com/nystudio107/craft-imageoptimize/blob/2a9b385fb2ba38a601b4a04d21f62a62d8594396/src/services/Placeholder.php#L286
Maybe this can be improved to don't force the format like on the transformations or the solution to this is to generate a silhouette?
Yeah I wish there was a way to specify what color it'd use on the background in these cases.
I'll have to think about the implications of not forcing the image to be a JPEG.
Generated placeholder images have a forced
jpg
file format. Here is an exampleThis is a PNG image that has been converted to JPG and gets a black background. This "looks" wrong when it loads.
I find a bit of code that forces a JPG format. https://github.com/nystudio107/craft-imageoptimize/blob/2a9b385fb2ba38a601b4a04d21f62a62d8594396/src/services/Placeholder.php#L286
Maybe this can be improved to don't force the format like on the transformations or the solution to this is to generate a silhouette?