Automatic decreasing of attachment weight

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
User avatar
wollastoni
Registered User
Posts: 82
Joined: Fri Mar 18, 2022 10:07 am
Location: BZH, France

Automatic decreasing of attachment weight

Post by wollastoni »

Hello,

My forum members are attaching tons of pictures everyday.
To avoid paying too much hosting fees due to picture attachment, I have set a limit of 800 kiB per attachment.

BUT this is an issue : many of my members stopped posting because they don't want to take the time to resize their pictures...

Is there a way to automatically downsize the attachment weight when someone uploads a heavy attachment ?
For example, when a member uploads a picture of 2000 kiB, the picture is accepted but automatically resized at 800 kib and stored at 800 kib on the server.
This way my server disk space would not increase too quickly and my members will stop complaining about not being able to upload pictures...

Thanks a lot for your help
Olivier
User avatar
[Dimetrodon]
Registered User
Posts: 438
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Automatic decreasing of attachment weight

Post by [Dimetrodon] »

Hi.

Sorry, but I do not think there is an auto-resize in the core of phpBB. This sounds like extension territory. You can try posting an idea, but I do not think it would be implemented anytime soon. You can try Extension Requests or if you're willing to pay, the Wanted! forum.
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72375
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Automatic decreasing of attachment weight

Post by KevC »

Just get them to use an image hoster like imgur or flickr.

Might be easier to request an extension to link an image hosting account to the forum so that they just have to click, upload and then the image is embedded from the external host.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
[Dimetrodon]
Registered User
Posts: 438
Joined: Tue Aug 30, 2022 3:29 am
Location: Paleozoic Era
Contact:

Re: Automatic decreasing of attachment weight

Post by [Dimetrodon] »

@KevC

It appears they have posted in wanted which makes the most sense tbh.
Avatar by someone named AdmiralRA on Reddit. (No, I don't have a Reddit account)
When seeking support, please consider filling out the Support Request Template. It makes it easier for anyone trying to help.
User avatar
AmigoJack
Registered User
Posts: 6113
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Automatic decreasing of attachment weight

Post by AmigoJack »

KevC wrote: Thu Sep 15, 2022 12:58 pmimgur or flickr
No, both are rather social media than image hosters. There are hosters much more fitting for storing bulks of pictures:
AmigoJack wrote: Wed Jun 20, 2018 7:06 am
AmigoJack wrote: Wed Mar 14, 2018 12:53 pm imgbox and ImageBam were very reliable for almost 8 years without quirky terms of service
And Imgur is a bad choice because...
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72375
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Automatic decreasing of attachment weight

Post by KevC »

First and foremost, they are image hosters, but never mind.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5885
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Automatic decreasing of attachment weight

Post by thecoalman »

Not sure what I'm missing here but if you set the max dimension on an image they are resized automatically client side. This would necessarily reduce the file size of image larger than those dimensions.

If for example you set the max height and width to 1500 which is more than sufficient for viewing on desktop you'll get a file size of about 250KB plus the thumb. Your mileage will vary with the file size depending on the image contents and this only applies to .jpg, .png will be much larger.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Post Reply

Return to “phpBB Discussion”