Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Bringing this back from the past rather than starting a new topic.
I don't have the ImageMagick option in my ACP. Was this function removed or is it something I have to implement on my own? I need the images to resize to my parameters automatically when a client uploads it from their device. If it's a 4MB photo, I want it resized to 1 or maybe less automatically, eliminating the need for the client to go find an app to resize their images and save them and then upload. I also want to enable them to copy and paste images into the text field and have those images automatically fit to my parameters if they are too large.
I have never installed an extension before, so this is all new to me. Is this a practical request?
Last edited by Mick on Fri Oct 11, 2024 8:05 am, edited 1 time in total.
Reason:Split from https://www.phpbb.com/community/viewtopic.php?t=2357236
If you set the max dimensions image files will be resized automatically client sized assuming they have JS enabled.
There is nothing standard for filesizes to try and hit some specific fie size in bytes. .png are lossless and usually twice as big as .jpg for same resolution. .jpg has quality slider available in the ACP, lower quality is smaller file but will introduce more atifacts the lower you go. Each is also dependent on the content.
That said you can set the max dimensions to 1500 both sides, the average .png will be around 1MB but some could exceed it. .jpg will be well below the 1MB threshold, probably in the 400KB range using 85% quality.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”
I tried setting the max dimensions to 1000 both sides and still when I try to attach a photo over 1Mb I get the message that the attachment is too large. Here are screenshots of my ACP settings for attachments.
Romaamor, I don't understand what that does for my problem. Sorry but I am very new to forum development, file types, and all the lingo really. Learning as I go. Will that extension resize client's photos and/or allow copy/paste into the text field?
You do not have the required permissions to view the files attached to this post.
I use several extensions on my forum.
1. Lightbox. Lightbox for phpBB can resize posted images to a maximum set height/width and display them full-screen in an elegant Lightbox overlay effect. Sets the visible size of an image in a forum post. (height, width)
2. Attached JPG/PNG to WEBP Image Convert.
It automatically converts uploaded JPG and PNG to WEBP format. This reduces the size of the uploaded file in MB.
3. Clipboard Image. Allows to paste image from clipboard to be added as an attachment.
Still no luck finding a way to do this. Is there no such thing? I know a forum that uses Invision Community which is written in PHP and they have features enabled that automatically resize images to lower file size, and they allow copy an image from online or anywhere, not just clipboard, and paste the images into the text field when making a post or reply. I want to offer the same for my members.
To reiterate assuming the user has JS enabled all images are resized to max image dimensions. for .jpg images with the settings you have the filesize will be around 200KB or so.
For .png images even when resized it's still going to be very large file size, increase max file size to at least 2MB to accommodate .png.
In cases where an image is not larger than max image dimensions if the file exceeds max file size is more than max file size it will be rejected. There is no way to force resampling the image based of filesize I'm aware of so the only solution is to increase max file size.
----------------------------
An extension was mentioned that will convert to webP. That should solve your problems. You can leave the max dimensions to handle that. Set the max file size to very high amount so nobody is getting errors. The extension will convert to webP producing a small file for all files.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”
cheesecrakr wrote: Sat Dec 07, 2024 9:37 pm
Yes thank you, I think we have the file size reduction working now. Still having trouble finding a way to copy and paste images into the text field.
Clipboard Image
Allows to paste image from clipboard to be added as an attachment.
I don't know if dirctly pasting is supported it but you can try this extension. I know there will be easier options for pasting URL's instead of having to manually edit them.