Bulk image attachment resizing/management.

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
digitaltoast
Registered User
Posts: 103
Joined: Thu Oct 18, 2007 9:33 am

Bulk image attachment resizing/management.

Post by digitaltoast » Wed May 13, 2015 9:21 am

phpbb 3.1.4 on Ubuntu 15.04.

Is there some tool, command line or other, than I can run through the entire attachment directory, find which are images, and resize to a max of say 1200 on either side, and also re-compress anything bigger than say 500k? For example, there are some ridiculously large 1200dpi scans of 8Mb there where the image is only 1024 in size; some images are tif from 2006 and so on.

If the images had extensions, I could do it in 5 minutes, but I guess I need one tool to identify the header, then if it's an image, pass it to imagemagick or something? And if I do it manually like this, what are the implications for the fact that the real filesize and attachment size in the database will then be different?

I've had a bit of a google and mod search; it's quite possible I'm just not using the right search terms.

Reason:
Our forum has grown up over a number of years, and the attachment folder size is now nearly 2Gb.
Most of it is images - and the way they are stored isn't too helpful as they are nameless and with no extension, although I can understand why.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21318
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Bulk image attachment resizing/management.

Post by Mick » Wed May 13, 2015 9:27 am

Not in standard phpBB, you would need an extension for that. There's this for 3.0 Knowledge Base - Backing up attachments with their original filenames, if you can give me ten minutes I'll see how it goes on a 3.1 board if it's any use to you?

Edit: Nope, no good for 3.1. You could do with something similar for 3.1, I'll ask one of the other support guys if he can figure it out.
"The more connected we get the more alone we become" - Kyle Broflovski

digitaltoast
Registered User
Posts: 103
Joined: Thu Oct 18, 2007 9:33 am

Re: Bulk image attachment resizing/management.

Post by digitaltoast » Wed May 13, 2015 9:38 am

Ah, thanks for your super-rapid response! Much appreciate. Thanks for looking into this.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21318
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Bulk image attachment resizing/management.

Post by Mick » Wed May 13, 2015 10:34 am

Yes, it does work, it was just me being thick. See if it does what you want if not you could make an extension request.
"The more connected we get the more alone we become" - Kyle Broflovski

digitaltoast
Registered User
Posts: 103
Joined: Thu Oct 18, 2007 9:33 am

Re: Bulk image attachment resizing/management.

Post by digitaltoast » Wed May 13, 2015 11:02 am

Thanks - that looks like a useful thing for sure, but doesn't really help with the "inline" resizing, or the problem of resized file vs what is in the DB etc.

In which case, I think I'll have a think about exactly what it is I need to do, make a use case for it, and put it out there to see if anyone is willing to make a mod!

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21318
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Bulk image attachment resizing/management.

Post by Mick » Wed May 13, 2015 11:20 am

Not MOD, extension ;)
"The more connected we get the more alone we become" - Kyle Broflovski

Locked

Return to “[3.1.x] Support Forum”