We place images in a Confluence page to hand-off to other internal teams. From there, that team can save the images in 3 ways:
However, we noticed with the first 2 options it's resulting in making the image file size 2-3 times larger than the file we uploaded, which is a huge problem for ad-serving. The download button requires an extra step, so I have to wonder: why is the file size fluctuating?
Can that be prevented? I would expect if I upload/insert a 200kb image, then no matter how it's saved out, it should remain 200kb or close to it. But we're seeing the file size increase to 700kb+. We are displaying the image full size (Original Size) when inserted into our Confluence template pages. Please help!
Let me thank you for the really great question; I learned a lot on this google adventure.
So here is what is happening: Confluence's Gallery tool changes JPGs to PNGs for thumbnail display. I tested this issue with PNGs, and there was no file increase.
I found an existing ticket regarding this here: https://jira.atlassian.com/browse/CONFSERVER-32957.
I also found this really excellent stack overflow thread that explains this issue: https://stackoverflow.com/questions/16636398/saving-jpg-to-png-increases-size#:~:text=JPEG%20is%20a%20lossy%20compression,is%20better%20at%20compressing%20photos.
So possible solutions would be to use PNGs as there's no loss in the conversion or to keep using the download button, as this downloads original JPG that is stored on the server and not the resized PNG, which is then converted back into a JPG on download, keeping the larger PNG size.
Once a file is converted to the larger PNG format, you can't shrink it back down to the lossy JPG format.
You can delete older versions of the image files attached to a Confluence page. That can help eliminate those large files, if desired. Otherwise they'll just bloat your Confluence backups forever.
Uploading the smaller image file with the same filename (to the same Confluence page) creates a new version of the image, and replaces the image on the page. You must upload it with the exact same filename to accomplish this.
"Attachments > View > Upload" is the safest way to replace a file in this way.
Note that deleting prior images might break old versions of the page (depending on the timing between page edits and image uploads).
Go “behind the screen” to meet some of the Confluence Cloud team. In this video series, we tackle some of the hard-hitting questions you never knew you wanted the answer to! Meet some of the ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events