Re: [ADDON] Resize attached images
Reply #60 –
Can't answer to your question, just a note, don't use a 60% quality, it's too low as quality, you will notice the differences. I'd suggest you to use something about 80-85%, a normal jpg file resized to 1024 X 768 at 80% will be about 100-120 kb, which is already a good result.
Re: [ADDON] Resize attached images
Reply #61 –
Yes, I don´t want the attachments bigger than 100 Kbytes each...
Re: [ADDON] Resize attached images
Reply #62 –
Can this plugin be updated , that it also resizes and reduces the filesize for already uploaded pictures ?
Re: [ADDON] Resize attached images
Reply #64 –
Still using this add-on and running well, I have a suggestion for it:
My users are posting screenshots from phones, and most of them are .png files, which are taking more space than a .jpg file.
Here an example:
- the png file 909 Kb
- the jpg file I converted on my PC is only 172 Kb (converted with command "mogrify -format jpg *.png")
Since it's an image without transparency imho it has no sense to be saved as PNG. What I suggest, obviously if it's possible: if the png file does not contain transparency then save it as JPG, if has transparency leave it as PNG.
Re: [ADDON] Resize attached images
Reply #65 –
Isn't that the Allow non-JPEG images to be reformatted to JPEG format when resizing setting?
Re: [ADDON] Resize attached images
Reply #66 –
Allow non-JPEG images to be reformatted to JPEG format when resizing.
Selecting this option will allow the system to reformat non-JPEG images into the JPEG format when necessary. The system will try to maintain the existing format unless the resulting image is still in excess of the maximum file size allowed.
I just checked, I have that enabled, but is useless in my case because I have set high values for:
Max attachment size per post 9600 KB
Max size per attachment 5000 KB
Max number of attachments per post 15
Re: [ADDON] Resize attached images
Reply #68 –
Here is something to test .... for 1.1 only .... Replace your existing file with this one (keep the old one safe in case you need to back out)
This will identify non transparent PNG files and if you have the checkbox to allow format conversion enabled, then it will change those non transparent PNG to a JPG (assuming the PNG was to big WxH or KB)
Sadly the only way to check for transparency is to examine every pixel in an image to see if it any have alpha value < 1. This indicates that it has some level of transparency. You can't simply trust how the file was saved (simple header read) since you can save a PNG that has no transparency with the transparency flag, thats just the way things work.
Should work with either GD or Imagick
Re: [ADDON] Resize attached images
Reply #70 –
Cool, thanks for testing. I'll pack this up and update the addon soon-ish
Re: [ADDON] Resize attached images
Reply #71 –
Will there be an update of this addon for the version ElkArte 1.1.7
Re: [ADDON] Resize attached images
Reply #72 –
nothing to report for now, it works with 1.1.7