Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

  • Admin Junkies is proud to announce 📣 an awesome ☀️ summer special on ✍️ Content Bundles for YOUR forums! Kickstart your discussions with a Content Bundle. For the entire summer through August, use the promo code AJSUMMER 🎉 to receive 50% 🎁 off your content bundle. For example, a package that normally only costs 100 Credits will only cost 50 💰 credits. Full news here.

XenForo and image compression

Joined
Dec 22, 2022
Messages
2,009
Website
astrowhat.com
Credits
4,440
Honestly... the two do not really go together in todays day/age... and it should.
For those that are running an image heavy site, I would recommend looking at Truonlv's Image Optimizer. You may get worried when you see the library requirements it has, but a default install of AlmaLinux 8 works fine with it, even though the version numbers it gives you are not what are shown in the documentation.

It takes a while to go through and optimize all the images you have selected... and it only does it at a set amount per run to keep from impacting your resources... and yes, you pretty much HAVE to be running on a VPS or a dedicated server instance to use it.

So far, on the run through, I'm getting about 40% size savings with no loss of image quality on my images... when you are talking some of these images are 5MB in size... that's a noticeable savings.
This one went from around 3008px/3008px 4.7MB to around 900K ... and it's still plenty "sharp".

full
 
Last edited:
Advertisement Placeholder
Or do it yourself via Photoshop, I do that myself anyway and reduce it by 50% if not more. Not only by doing it but keeping the space low on the drive and less for browsers to load and faster the webpage.

How far can you go down to the point that the image looks bad, 900KB is still high though!
Only problem with that.. I don't control the images that my users upload... your presumption is that I have access to their images prior to upload. ;)
As for how high you can go down... some of the cameras in my field can easily get to 30-40MP. If you want to offer those images in all their glory.. then you have to make "exceptions" and not size them down drastically in both format and quality. It's pretty apparent you didn't expand that image to it's full size (even at 900KB)... it's giving basically the same quality as it did at a 4.7MB size.
 
Cloudflare Polish is available for lossless or lossy image optimization that also changes it to WebP.

Cloudflare Polish · Cloudflare Image Optimization docs https://developers.cloudflare.com/images/polish/
That seems like it does what the TL image optimizer plugin does from what I can see. Strips extra EXIF data that's unneeded, compresses the image, with a good chunk of average savings.

TL's plugin is overall quite a bit cheaper than Cloudflare's option, unless CF's is somehow better? I wouldn't know, I'm on free plan of Cloudflare and its enough for me.
 
Cloudflare Polish is available for lossless or lossy image optimization that also changes it to WebP.
$240 a year minimum vs a one time $29.99 fee then $15 renewals.
The add-on does basically the same thing as CF Polish does with the exception of serving in in WebP... which in many cases a benefit because now those images that are available for use by others as backgrounds don't have to be converted from webp to JPG.
In fact, you actually have MORE control with the add-on than you do with CF Polish.

Screen Shot 2023-09-07 at 5.03.29 PM.png


In addition... you can restrict set groups from having their images resized.
 
$240 a year minimum vs a one time $29.99 fee then $15 renewals.
The add-on does basically the same thing as CF Polish does with the exception of serving in in WebP... which in many cases a benefit because now those images that are available for use by others as backgrounds don't have to be converted from webp to JPG.
In fact, you actually have MORE control with the add-on than you do with CF Polish.

View attachment 2053

In addition... you can restrict set groups from having their images resized.
Yea, 30, then 15 renewals (when there's an update) is much more affordable than 240, even if its a hobby site.
 
Only problem with that.. I don't control the images that my users upload... your presumption is that I have access to their images prior to upload. ;)
As for how high you can go down... some of the cameras in my field can easily get to 30-40MP. If you want to offer those images in all their glory.. then you have to make "exceptions" and not size them down drastically in both format and quality. It's pretty apparent you didn't expand that image to it's full size (even at 900KB)... it's giving basically the same quality as it did at a 4.7MB size.
Yeah, I get that problem myself lol users upload so LARGE images but there are ways to deal with that :)

  1. Max upload file size allowed for each image = 500kb or whatever, That being said it's too low members not going to bother uploading.
  2. IPBs and some other third-party apps, as soon as they upload reduce...
  3. Download reupload :p NOPE
  4. I have Cloudflare in place setup
 
Yea, I have audio/video uploads disabled (embed those) and images for reg members max out at like 8 Mb. That should be plenty enough for a 1080p image. For paid upgrades, I extend that limit to max size our uploads allow, 20 MB. Which should be plenty for 4K game shots.
 
Yea, I have audio/video uploads disabled (embed those) and images for reg members max out at like 8 Mb. That should be plenty enough for a 1080p image. For paid upgrades, I extend that limit to max size our uploads allow, 20 MB. Which should be plenty for 4K game shots.
Keep the size of the site down then, 4K videos are damn large
 
Pictures don't take nearly as much space as a video.
nope... but a 4K image at native resolution will be roughly 24MB.... and if you can reduce that by 40%-50% with no loss of image quality you immediately come out ahead... and that's pretty much what the image optimizer add-on I am using does.

Screen Shot 2023-09-09 at 4.45.34 PM.png
 
Last edited:
nope... but a 4K image at native resolution will be roughly 24MB.... and if you can reduce that by 40%-50% with no loss of image quality you immediately come out ahead... and that's pretty much what the image optimizer add-on I am using does.

View attachment 2073
hmm, maybe I should set max php upload to like 30 then? (ofc only allow paid users to upload 4K high res images to give a reason to upgrade.)
 
That's a choice you have to make.... I limit my upload sizes to 15MB for all (for attachments) and in XFMG, for those that have gotten promoted into the normal member group (out of registered) it's 30MB for gallery uploads with unlimited pixel size (but they do get resized down after upload). There is no "paid users" level used on my site... everybody is pretty much the same with the exception of banners for some of the founding members, but they have the same settings as the others for everything else.
 
That's a choice you have to make.... I limit my upload sizes to 15MB for all (for attachments) and in XFMG, for those that have gotten promoted into the normal member group (out of registered) it's 30MB for gallery uploads with unlimited pixel size (but they do get resized down after upload). There is no "paid users" level used on my site... everybody is pretty much the same with the exception of banners for some of the founding members, but they have the same settings as the others for everything else.
True, I could set thread & UBS blog attachments to a standard level, then XFMG for higher detail images. Still, I like to offer more than 1 perk for the different tiers (since each tier also grants game server perks).
 
hmm, maybe I should set max php upload to like 30 then? (ofc only allow paid users to upload 4K high res images to give a reason to upgrade.)
Here is a classic example... and it's not a 4K image.. simply a 3008x3008 processed image with 100% JPG quality enabled.

Screen Shot 2023-09-11 at 2.10.12 PM.png


I upped the attachment size limit to 50MB (for my site) and then also found another issue.... this image originally would only "insert" as an attachment. There is an additional /src/config.php entry you need to make to allow XF to process larger images.
Until I changed it, when I would drag/drop, insert as an attachment or even insert media from the BB code, the image would only show as a hyperlink.
I had to add this setting into my config.php - $config['maxImageResizePixelCount'] = 60000000;
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Who read this thread (Total readers: 0)
No registered users viewing this thread.

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 7 22.6%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 24 77.4%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds