How convert PNG attachments to JPG?

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Ideas Centre
Post Reply
User avatar
AlexandrBu
Registered User
Posts: 45
Joined: Tue Jan 02, 2018 6:31 am

How convert PNG attachments to JPG?

Post by AlexandrBu »

Hello

I am running phpBB forum on Ubuntu server, and i need to free some space, how can i convert all PNG attachments to JPG?

i cant just run

Code: Select all

mogrify -format jpg *.png
Files in attachmante folder dont have extensions...

Board started: Sat Jul 02, 2005 15:45
Avatar directory size: 48.1 MiB
Database size: 3.15 GiB
Size of posted attachments: 70.48 GiB
Database server: MySQL(i) 8.0.32-0ubuntu0.22.04.2
GZip compression: Off
PHP version: 7.4.30
Orphan attachments: 1266
Board version: 3.3.10
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: How convert PNG attachments to JPG?

Post by Mick »

Do you mean existing ones? I’m not sure you can, you’d have to convert them with an image editor and then re-attach them. I’ve read that a compressed JPG can be as much as 10% of its PNG equivalent but that’s not my experience. GIF is smaller but with loss of resolution. Also don’t forget PNG supports transparent backgrounds while JPG doesn’t so converting to JPG could mess up the image.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How convert PNG attachments to JPG?

Post by stevemaury »

You could start by getting rid of the orphaned attachments.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Post Reply

Return to “phpBB Discussion”