If you’re searching for how to compress images on Fedora or wondering how to optimize images for WordPress without relying on plugins, you’re probably running into the same frustration I did.
You upload a photo.
Then you wait for Smush or WP-Optimize to process it.
Then you hope it compressed enough.
It works — but it slows everything down.
The better solution is simple: compress images locally on Linux before uploading them to WordPress.
It’s faster and private. Plus it turns image optimization into part of your workflow instead of an afterthought.
Here’s exactly how I do it on Fedora.
Why Compress Images Before Uploading to WordPress?
When you upload oversized images and let WordPress handle optimization later, you’re adding unnecessary data to your server. Those are larger files consuming space. Compressing and converting files flips the web server from loading pages to doing data tasks. It’s just not worth it.
When you reduce image file size on Linux first, your WordPress site loads faster immediately. There’s less server work, less plugin overhead, and fewer surprises.
This is especially important if you care about:
- Improving WordPress site speed
- Better SEO performance
- Keeping your workflow private and local
Now let’s get practical.
Install Image Compression Tools on Fedora
If you’re on Fedora, open the terminal and install what you need:
sudo dnf install imagemagick jpegoptim optipng pngquant libwebp-tools
That covers resizing, JPEG compression, PNG optimization, and WebP conversion.
You don’t need all of them every day. But together, they give you the complete tools.
Beginner Method: Compress JPEG Images Quickly
If you’re new to the terminal, don’t overcomplicate this.
Most WordPress blog photos are JPEG files.
To compress a single image:
jpegoptim --max=80 image.jpg
That reduces quality to 80%, which is usually indistinguishable visually but dramatically smaller in file size.
If you have several images in a folder:
jpegoptim --max=80 *.jpg
That’s it. Seconds instead of plugin processing time.
Compress and Convert Using A GUI Tool
Using a command line tool is simple enough. However, a GUI tool may feel more intuitive.
I installed YOGA Image Optimizer for quick compression and file conversion:
flatpak install flathub org.flozz.yoga-image-optimizer
After install, I loaded the banner for this post.
The before PNG was 2.54 MB. I chose to convert and compress at once. The converted .webp file is 190 KB. It took less than 10 seconds. That is a tremendous space savings that will positively affect page load times.
Resize Before You Compress (Important for SEO)
Most phone and camera images are 4000 pixels wide or more. WordPress rarely needs anything above 1920px.
Resizing dramatically reduces file size.
Here’s how to resize and compress in one step:
magick input.jpg -resize 1920x -quality 80 output.jpg
This single command often cuts file size by more than half.
For PNG images like screenshots:
optipng -o7 image.png
Or for stronger web compression:
pngquant --quality=60-80 image.png
At this point, you’ve already optimized your image for WordPress before it ever touches your server.
Advanced Workflow: Convert to WebP for Maximum Performance
If you want even smaller files and better performance, convert images to WebP.
cwebp -q 80 input.jpg -o output.webp
WebP images are typically smaller than JPEGs at similar quality levels and are fully supported by modern browsers.
For batch processing:
for i in *.jpg; do
cwebp -q 80 "$i" -o "${i%.jpg}.webp"
done
Now you’re thinking in workflows, not single uploads.
Why This Beats Online Image Compressors
Tools like TinyPNG, Smush, and other WordPress plugins compress images after upload.
Local Linux tools let you compress images before uploading.
That shift matters.
It saves time.
It improves privacy.
It reduces server load.
And it makes WordPress feel faster overall.
If you publish regularly, the difference is noticeable.
Best Image Settings for WordPress
In practice, these defaults work well:
Images rarely need to be wider than 1920px.
JPEG quality between 75 and 80 keeps visual clarity high.
WebP is ideal when supported.
PNG should be reserved for graphics or screenshots.
Once you adopt these defaults, image optimization becomes automatic.
Final Thoughts
If you’re using Fedora and running WordPress, you don’t need to rely entirely on online image compressors or plugins.
Compress locally.
Resize before uploading.
Convert when it makes sense.
You’ll improve WordPress site speed, protect your privacy, and build a more efficient Linux workflow.
In the next post, I’ll compare these Linux tools directly to popular online image compressors to see which actually delivers better results.
Discover more from Hacking The Hike
Subscribe to get the latest posts sent to your email.
