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.
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.
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.
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: -joomla-site.com/images/NewImages/beauty.jpg). If the image is displayed, then the base URL is correct.
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.
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.
Having a fast Joomla website with excellent performance is a key factor for your SEO efforts. Slow sites may not necessarily make your SEO rankings drop immediately, but speed is an actual ranking factor (see this article on searchengineland.com). More importantly, if a visitor tries to access your site and it takes more than a few seconds to load the site, he might leave the site before it loads. This is registered as a bounce by Google and a low bounce rate may harm your rankings. A general rule of thumb is to keep the time needed to load your site under 2 seconds, but preferably faster. And you can definitely achieve this with your Joomla site. Especially Joomla 4 has become even faster than Joomla 3, out of the box. But there is a lot you can do to make it even faster, let's discover the options:
Now that you have chosen a hosting company, you should also look at which server package you select. For really high-traffic sites or sites that are important, choosing a dedicated server package will probably be your choice. But also shared servers can still offer great performance, even if they have some downsides. When you are on a shared server, you share the same IP (and resources) with other sites on the server. Especially if you share the same IP as an insecure or malicious site, this could potentially be bad for your online reputation, and in some cases, even for your ranking.
This also depends on how close your host monitors their sites. For 80-90% of websites, being on a shared server should really not be an issue.
Happily, there are quite a few companies that offer excellent hosting and comply with the requirements mentioned here. Personally, I only have experience with Siteground.com and they offer great performance. I used to have some issues in the past, but currently, I am very happy with their performance and also their support. But there are plenty more companies. For Siteground, I have written a full review.
Always keep your server software, Joomla core, and Joomla extensions up to date. New software often incorporates performance updates, and you don't want to miss out on these. I already mentioned that Joomla 4 is faster than Joomla 3. PHP 8 is faster than PHP 7 or lower, etcetera. Of course, updating stuff should be a no-brainer for any Joomla admin, but I often see old software out in the wild...
With Joomla beginners there often is a tendency to install a lot of extensions, especially front-end extensions like galleries, social media feeds, video plugins, etc., because they look so nice. Especially extensions connecting to external sources, like Facebook, Twitter, Picasa, Flickr, etc can seriously extend the load time of a page because the external connection takes additional time. However, every additional extension will always take up some time. Well-programmed extensions will take a minimal amount of time to load, so it also pays to check only extensions of well-known providers. Of course, in most sites you will have to use some extensions, you can hardly build a ticket-selling website without an event manager, but whether you need a Twitter feed on all your pages is worth considering. Maybe you just need it on your contact page, which will free up the homepage.
Sliders and carousels should be avoided as much as possible. Though web designers and their customers often find these very attractive, actual users that visit the website often ignore them, or even treat them as ads to be blocked (banner blindness). Usability tests have proven that they are often very ineffective and that no more than 1% of users ever click on a link or feature in the slider. On top of that, they usually require multiple (large) images and Javascript files or libraries.
Make sure you check your Joomla template if you need to optimize your website speed. Templates with a lot of stylesheets, javascript files, and javascript libraries slow down your website speed and should be avoided. Some templates offer optimization from within the template settings, like CSS compression, optional loading of Bootstrap, etc. Personally, I mainly use Yootheme templates, as they are pretty lightweight compared to other providers.
Now that our basic setup is top-notch, the next step is to investigate the performance options within Joomla. One of the first ones you should encounter is the option to activate G-Zip. This activates a built-in compression mechanism for your Joomla assets and HTML. You can access the options from within the Global Configuration settings, on the Server tab:
Caching offers users a stored view of a web page so that the server doesn't have to perform interactions with the database. This can save a lot of processing time, resulting in much faster page loads. Where G-zip only offers small gains, caching can result in massive gains. However, it can also result in massive issues if not set up correctly!
Joomla and almost all other CMSs are PHP / MySQL based, which means that in order to generate the necessary HTML needed to show the user a web page, a lot of processing has to be done first, first pulling the article data from the database, the same for the modules, and then composing this into one HTML page. This is why completely static HTML sites are usually faster. Caching tries to overcome this by re-using the earlier generated HTML from Joomla.
This usually speeds up the load time of a webpage, but the disadvantage could also be that a user looks at a stored view, while the actual page has been changed in the meantime. Whether or not this is a problem depends on the site. When you are busy developing a site and making a lot of changes, it is usually best to leave caching switched off. Also, there could be functionality that does not work well with caching, like some captchas, forms, and webshop extensions (Virtuemart, Hikashop, etc). With additional configuration, this can sometimes be overcome.
For this reason, a default Joomla installation ships with caching switched off. The Joomla core offers a number of possibilities to use caching, in multiple locations: per Component, per Module, or per Page. The stored views for this are actually stored in the filesystem, in the /cache/ folder, as you can see when caching is switched on. You see a number of folders and files sitting there, which are actual HTML files that are offered directly to the user.
You can see com_* for component views, mod_* for module views, and page for full-page views. When you examine the files in these folders, you can actually recognize the pre-generated HTML content. Note that you cannot just access these files directly, they need to be served by Joomla. When you actually want to use caching, you can activate it on multiple levels. Let's see how they work:
Progressive caching can cause unexpected issues in rare cases, so it is advised to use the conservative option. This turns on caching for the component and modules. It also allows you to override the global cache setting on a per module basis while progressive caching does not allow this, as it stores a cache view of the combined modules.
7fc3f7cf58