Needs work
Project:
Image Compression
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2022 at 09:17 UTC
Updated:
1 Aug 2022 at 21:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Lordy_Nathan commentedComment #3
Lordy_Nathan commentedComment #4
Lordy_Nathan commentedComment #5
3liShall try and review this when available.
Comment #6
Lordy_Nathan commentedComment #7
avpadernoComment #8
niknakHello,
Anybody are already review this patch ?
Thx
Comment #10
anoopsingh92Comment #11
anoopsingh92Hi, I am not able to access this configuration "/admin/config/user-interface/image_compression".

I am getting this error
I also checked in the DB log getting this error.

I am using Drupal 9.5.0-dev PHP version 7.4.29 DB 10.4.24-MariaDB
Thanks
Comment #12
avpadernoComment #13
avpadernoimagejpeg()creates a JPEG file from the given image. It cannot be used to save a PNG image.Surely, a JPEG image would be more compressed, but that's because JPEG uses lossy compression, while PNG uses lossless compression.
The quality for JPEG images ranges from 0 to 100, while the quality for PNG images ranges from 0 to 9. (-1 is a special value that means use the default value in both the cases.) While a quality of 100 for a JPEG image means getting a bigger file, a quality of 9 for a PNG images means a smaller file. (It's all relative, since the smaller PNG file could still be bigger than the bigger JPEG file.)
This means the code needs to handle JPEG and PNG images differently.