Compress and optimize images on Joomla website with ShortPixel Image Optimizer.
ShortPixel Website Optimizer is an image compression tool which makes your image smaller and your Joomla websites faster. Fixing the speed issues is paramount. Slower loading pages translate to less satisfied visitors, unhappy Search Engines, scarce hosting resources. In this article, we will teach you how to use ShortPixel Website Optimizer to compress the images for Joomla sites.
Who is ShortPixel and how it’s working
ShortPixel is better known for their popular WordPress plugin. They have good reviews, their user base is growing fast, and they are recommended by search engine specialists like the guys from the Search Engine Journal.
ShortPixel works on Software As Service paradigm. ShortPixel takes your images to its servers, reduces their sizes and replaces your original pictures with the compressed ones. If you have chosen a backup folder, the original images will be stored there.
Less known than the WP plugin, the ShortPixel API tools can deal with a broad range of website configurations and users needs. One of these tools is the ShortPixel Website Optimizer. It can compress images for different CMSs: Joomla, Drupal or even flat file CMSs like Grav.
How to use ShortPixel Website Optimizer on your Joomla website.
You need only three things to optimize the images from your Joomla website:
- install the ShortPixel Website Optimizer on your site
- get a ShortPixel API key
- launch ShortPixel Website Optimizer and optimize your images folder.
Get a ShortPixel API key
Singin up at ShortPixel.com is easy and brings you a free account with 100 image optimization credits/month. After you sign-up you’ll receive an API key. You will need it later for validating your ShortPixel installation. Moreover, an API key can be used on multiple domains.
Install ShortPixel Website Optimizer on Joomla
Check the ShortPixel Website Optimizer page, and download the latest version of the tool. Unzip the archive in your Joomla website root folder. A new directory called shortpixel-web will be created. Sometimes, the new directory doesn’t have the correct write permissions, so you need to be sure that the ShortPixel servers can edit the document within this folder.
Tip: For Linux servers, just use this line: sudo chown -R www-data:www-data shortpixel-web
In order to check that your ShortPixel Website Optimizer is properly installed and ready to go, type http://[[your-joomla-website.domain]]/shortpixel-web/webroot/index.php in your browser address bar.
You should see the ShortPixel Website Optimizer interface:
Some server configurations like rewrites and redirects could prevent this page to load. You will need to correct those settings. If you need help, just contact the ShortPixel support team.
If the page loads, then you can activate it with your API key and complete the install process.
You are ready now for the fun part: optimizing the images.
How to optimize Joomla website images with ShortPixel
Just (1) select the desired folder, (2) accept the base URL and review settings, (3) press Optimize now. It’s that simple.
But if you really want to get the best out of ShortPixel Web tool for your website, let’s get into detail on each step, so you can see all the possibilities that this tool offers.
First, you have to select the folder where your images are stored. In our case, it’s NewImages folder. Click Browse button, locate and select the NewImages folder.
Confirm that ShortPixel detects the correct base URL of your images.
The NewImages folder is selected.
Short break, to explain what base URL is, and why it is important to check if it is correct: ShortPixel guesses the URL of your images using your website configuration. In the most situations, the base URL is correct, and there is a simple way to verify this. Copy the URL to your browser, add a slash and the file name of an image that is present in the given folder (like this: http://your-joomla-site.com/images/NewImages/beauty.jpg). If the image is displayed, then the base URL is correct.
Image Optimization parameters
Before compressing your images, go and verify that the ShortPixel default settings are the right ones for you.
ShortPixel offers both Lossy and Lossless optimization methods. Lossy is the best option for faster Joomla websites.
You can choose to remove EXIF info or to do CMYK to RGB conversion in the next fields. Both are on by default and recommended.
ShortPixel can resize your images maintaining the aspect ratio. The first option uses the smallest side and makes it equal with the chosen maximum. In the second case, ShortPixel resizes the image to fit the given rectangle. In both cases, the image is not cropped. Resizing can be an important setting to sanitize images having really big sizes like the ones that are uploaded directly from cameras or phones, which can have easily 4-6K x 2-3K pixels.
ShortPixel generates WebP versions for your images free of charge if you check the corresponding option. WebP is the Google new image format, and it is said that it can help increase the Search Engine Rankings. Remember that you will need a solution to serve the WebP files to the compatible browsers.
Backup and Excluded folders
You can set folders to be excluded from optimization if, for example, you have custom back-ups or images that need to be left untouched.
We created a folder called OtherImages and we typed its name in Exclude field (case sensitive)
ShortPixel Website Optimizer is a reliable tool but it’s better to be safe than sorry, so don’t forget to set your backup folder. Browse to your NewImages folder and select it as the home of your backups. The ShortPixelBackups folder will be created inside it. This will allow you to restore the original images by replacing the images in NewImages folder with those from the backup folder.
That’s all! Click Optimize now and the bulk processor will start.
Don’t close ShortPixel Website Optimizer tab so it can do its job. You can work on your site or browse the web, but in other tabs.
Closing the tool page will stop the process. Of course, you can resume the image optimization any time by opening the image optimizer page again.
After the image compression is done you will get a page the optimization details, but if you want the full report then go to your ShortPixel account and download the Optimization Report. There you can find the list of the files that you compressed in the last 40 days.
As you can see, the images within OtherImages folder weren’t optimized because we previously excluded them from the process.
If you add new images in your Library, then simply restart the ShortPixel Website Optimizer.
Tips to secure your ShorPixel Website Optimizer installation
If you have a public Joomla site, you might want to add basic authentication to your ShortPixel Web Optimizer, so please check https://wiki.apache.org/httpd/PasswordBasicAuth which has all the necessary info.
Another step you could take to increase your security is to change the name of your ShortPixel folder (shortpixel-web/).
How to optimize images in your Joomla Template
Compressing the images outside your Media library is easy, just choose the folder with the images as we did above.
For example, Beez3 template is located under templates folder. Just select the image folder within and click optimize now. You could also update the backup folder to be stored here.
ShortPixel paid plans
Don’t forget that the free account is limited to 100 images each month. You can have more credits if you purchase monthly or one-time plans. Check here plans and pricing.
Joomla powered websites are sometimes slow, and many believe that it’s the CMS’s fault, which is not fair. In fact, the biggest issue is related to using unoptimized images. You just learned a method to solve this issue and make Joomla some justice. Of course, you can optimize images yourself, but using an online tool is a lot easier, and less prone to mistakes.
So, give ShortPixel a try and see how it works for you!