JS & CSS Compressor + Image Optimization(v.2.3.0 + 2.1.1)
Improve your Google Page Speed and GTmetrix performance scores with this powerful solution for Magento optimization.
- Merge of JS and CSS files
- JS and CSS files minify (compression)
- Image optimization
- Image lazy load
- Minify HTML
- Inline small CSS/JS
- ... and many more!
- Free & lifetime support and updates.
Customers don't like slow sites. Studies say that customers leave a website if a page hasn't loaded in 4 seconds. Keep your users engaged by providing a fast performing Magento store.
Search engines don't like slow sites. Website speed is a ranking factor in Google search.
“JS & CSS Compressor + Image Optimization” extension for Magento is a powerful solution for reducing number of requests sent to a web server, image optimization, JS/CSS files compression and minification. Improve your Google PageSpeed and GTMetrix score with HTML compression, image lazy load and defer parsing of CSS/JS (fix a render blocking content). Hundreds of happy merchants use the extension on live websites. See the full list of features below.
Performance optimization of websites is one of the biggest trends in e-commerce. Many brands are investing in performance optimization, as they know for sure that store performance impacts the shopping experience and overall satisfaction of customers.Did you know?
According to httparchive.org, 64% of the page bytes are images. So it is obvious that image optimization is the key way to significantly improve performance of web pages.
Image Optimization is a process that reduces file sizes and eliminates excess information. As a result, files have smaller size and are loaded faster. Our Compressor extension provides image optimization process without quality loss.
“JS/CSS Compressor + Image Optimization” extension uses the utilities which are recommended by gtmetrix.com service: jpegoptim, optipng and gifsicle. They neither change image resolution nor impair image quality; but compress images to decrease their size.
“JS/CSS Compressor + Image Optimization” extension provides a feature to make a backup of all images in 'media' and 'skin' folders before starting the image optimization process. However, our customers have never across any problem with optimized images. Moreover, our module has an option to exclude certain images from being optimized if necessary.
Image Optimization features
- Optimize JPEG, PNG and GIF images
- Merge images (new and unique feature)
- Lazy load of images
- Set image dimension
- Serve scaled images
- Advanced management of image optimization
- Automatic backups of images
- Check image optimization status
(fix "render blocking content" issue)
- Add 'Expires' headers
- Minify CSS files
- Merge CSS files
- Inline small CSS
- Exclude specific CSS files
- Defer parsing of CSS
- Add 'Expires' headers
Merge of JS/CSS files
The Merge functionality of the extension allows combining all JS/CSS files from the page into one single JS/CSS file. When files are merged, a browser performs only one request to a server to download JS or CSS file of the page instead of several ones, which leads to decreasing of page load.
Time spent on loading JS/CSS files depends on file size: the less the file size is, the faster page load becomes. Compression allows reducing JS and CSS file sizes by eliminating comments, line breaks, tabulation and space symbols which are not necessary for a browser to ‘read’ the code. Thereby, page loading time decreases without affecting code quality and logic.
While rendering HTML document, a browser is downloading resources (JS, CSS and images) the way they appear in the HTML DOM.
Inline small CSS
Loading of CSS or JS file has 3 stages:
- Send a request to server;
- Wait for the request to be processed at server;
- Receive response from the server;
It’s better to insert content of small CSS/JS files right into HTML document as they start working only on the 3rd stage. As a result, a page will load faster.
Merge of Images
2.2.0 version of Compressor extension has been enhanced with "Merge of Images" feature. It does not affect page appearance in any way, but it speeds up Magento store by reducing number of image download to one. It's hard to believe, but it works. Instead of making dozens of requests to download each image on product page, a browser will make only one request to download a single image file.
Other features, support and refund policy
- Magento Enterprise FPC support
- Varnish support
- Lifetime free support, bugfixes and extension updates
- Free installation service
- The code of the extension is open - it’s easy to make compatibility with 3rd-party extensions
- 30-day money back guarantee
“Lazy load”, “Set image dimension” and “Serve scaled images” features
Lazy load is a technology which allows holding over image loading until a user scrolls to a certain image. The usage of Lazy load improves overall page performance, which works for long pages and catalogues.
Set image dimension option is used to add height or weight image attributes if they are absent. It allows avoiding unnecessary repainting of a web-page and rendering pages faster.
Serve scaled images option enhances website performance through saving many bytes of data. It is very useful for mobile devices as such an option allows downloading re-scaled images instead of full-resolution image version.
Questions & Answers
- Is “JS/CSS Compressor + Image Optimization” compatible with Redis and your Full Page Cache extension?
- Is the “JS/CSS Compressor + Image Optimization” extension compatible with CDN?
- 37 Reviews
Brilliant extension, perfect support. 50% load times!!!!!I have a confession to make. I knew I had CSS errors which were stopping me from using the native minify settings under 'Developer' in 'System Configuration.
But I noticed some really great reviews for this extension, where people who had similar template issues upon install had gotten them fixed within 24 hours, as part of support for setting up the extension.
Sure enough, I installed the extension and had the same problems I had with the native settings. I reported to support and was greeted almost immediately. 24 hours later, the problems were all fixed.
On top of all that, my PageSpeed scores increased by 10% and reported load times down from 12 seconds to 6.1 seconds.
And optimises your images also! Bonus!
Must have module from an excellent team.
Give it a go.
Must have moduleMust have module. My shop loads fast now.
I has problem with web theme, but potato team solved it less than 1 day.
Great support and moduleI purchase Compressor by Potato and like it a lot. My shop is very fast now. Also guys helped install module on my shop and configured too! Great support and work of team!
I found just what I was looking forI appreciate, cause I found just what I was looking for. You have ended my 4 day long hunt! God Bless you man.
Very Good Extension, Fantastic Communication & SupportWe bought the Magento JS & CSS Compressor & Image Optimization as while Google gave our website (Magento Community Edition 22.214.171.124) a good mobile score it considered it slow. When we first installed the plug in there were a few issues. Potato Commerce were quick to help and the issues were sorted out quickly and professionally. I thoroughly recommend both this product and this company.
Write Your Own Review
Magento CE 1.5.*, 1.6.*, 1.7.*, 1.8.*, 126.96.36.199 - 188.8.131.52, 1.9.3* Magento EE 1.11.*, 1.12.*, 1.13.*, 184.108.40.206 - 220.127.116.11, 1.14.3.* Compatible Browsers Chrome, Safari, Firefox, Opera, IE8+
- We recommend you to backup your store before installation
- Go to Magento Admin and disable compilation (Systems > Tools > Compilation > 'Disable' button) and flush store cache (System > Cache Management > 'Flush Magento Cache' button)
- Download the extension package from your account and extract the downloaded archive.
- Copy the content of extracted folder to your store's root directory
- Set 755 permissions on all files in lib/PotatoCommerce/ImageOptimization/tools folder. Important! Otherwise, image optimization will not work.
- Flush store cache again
- Log out from the backend and log in again. Important!
- If you use compilation, then you should run compilation process (Systems > Tools > Compilation > 'Run Compilation Process' button).
- Go to extension configuration (System > Configuration > PotatoCommerce Extensions > JS / CSS Compressor), enable and configure the extension
- Disable native CSS and JS merge at System > Configuration > Developer.
- Flush store cache again
To make the extension working properly on your web-server, please make sure that the following requirements are met:
JS and CSS optimization
- If you use Apache, then mod_deflate and gzip should be enabled on your server.
- exec function should be enabled
- All files in folder lib/PotatoCommerce/ImageOptimization/tools must have '755' permissions
- Media and Skin folders must be readable and writable by webserver user.
After installing "Compressor" extension my store gives 404 error or a blank page.
Go to Magento Backend, Flush Store Cache (System > Cache Management> 'Flush Magento Cache' button), Logout and Login again.
Go to Magento Backend, Flush Store Cache (System > Cache Management> 'Flush Magento Cache' button). Contact us if the problem persists.
How do I exclude specific scripts or CSS files from being deferred, compressed and minified?
Example of excluding file that included in layout:
skin_js js/smartheader.js po_cmp_ignore
Effective from 2.0.0 version of the extension, you can also use flags po_cmp_ignore_move and po_cmp_ignore_minify.
po_cmp_ignore_move ignores only merge and defer (it does not allow to move the node).
po_cmp_ignore_minify does not allow to compress content.
There is also a textarea added to the extension settings, which works same was as po_cmp_ignore flag does - it does not allow to move and compress the node. Strings which are added to the textarea, are being searched within URLs of scripts/styles, or in content if the nodes are inline (<script>...</script>, <style>...</style>).
How can I test my store performance? Can I check that your extension actually works?
Image Optimization does not work. Why?
If image optimization does not work on your website, then we recommend you to check:
- Please make sure that exec function is enabled
- Make sure that Media and Skin folders are readable and writable by webserver user.
- Make sure that all files in folder lib/PotatoCommerce/ImageOptimization/tools have 755 permissions. If it’s not, then set 755 permissions and try to start image optimization again.
- If your server is on Ubuntu OS and previos steps did not help you, then please contact us so that we can investigate the issue on the ground.
If your server is not on Ubuntu OS, then you should check if the applications are installed properly. To make this please do the following:
- Go to folder lib/PotatoCommerce/ImageOptimization/tools/unix (go to ‘64’ subfolder as well if you have 64-bit OS)
- Run the following commands:
- If you receive an error (for example, “segmentation fault (core dumped)”), then please refer to this article to fix this issue.
Which issues in the Google Page Speed / GTMetrix report does the extension fix?
Compressor extension is designed to fix the following issues:
- Enable gzip compression (for apache webserver)
- Inline small CSS
- Minify CSS
- Minify HTML
- Leverage browser caching (partially fixed)
- Serve scaled images
- Eliminate render-blocking CSS
- Specify Image Dimensions
Other problems can not be fixed automatically and thus can not be fixed by the extension (or by any other competitor's extension). It can be fixed only via web-server configuration and website theme improvement.
Can Compressor minify HTML?
Yes! 1.6.0 version of the Compressor extension was improved with simple HTML minification.
After extension installation there is Fatal error: Class ‘Potato_Compressor_Helper_Data’ not found in /home/www/public_html/app/Mage.php on line 547
It looks like you forgot to disable compilation before installation. If you can't go to Backend > Tools > Compilation and re-run compilation process (because of the fatal error), then you need to disable compilation manually. To do this please open config.php file in 'includes' folder. Find these:
you should comment lines like that:
Admin panel will be alive then. Now you need to go to Backend > Tools > Compilation and re-run compilation process. After that, everything should work fine.
Should I disable native Magento CSS and JS merge at System > Configuration > Developer?
Yes, we recommend to disable native CSS and JS merge. We don't expect any conflicts here, but native merge can slightly slow down the work of our extension. You can disable native merge of files at System > Configuration > Developer.
I need to edit a CSS/JS file. Which file should I edit - original or merged and compessed?
If you use our Full Page Cache extension, then you would need to flush cache of Full Page Cache extension as well.
How to disable Compressor Extension?
Do not disable this module at 'disable module output'! Just go to Compressor settings and set "Enable" option to "No". If you can't access the Magento backend, then you can disable the extension this way - rename file app/etc/modules/Potato_Compressor.xml to Potato_Compressor.xml.OFF
How to unistall the extension?
- Disable compilation (Tools > Compliation) if it's enabled
- Delete file app/etc/modules/Potato_Compressor.xml
- Fluch cache storage (System > Cache Management)
- Delete the following folders and files if they exist:
- media/po_cmp_image <- do not delete this folder if your want to retain the backup of images!
- skin/po_cmp_image <- do not delete this folder if your want to retain the backup of images!
- media/po_compressor <- do not delete this folder if your want to retain the backup of images!
- Remove `table po_compressor_image` from the database
- Run compilation again if necessary.
JS/CSS/HTML Compressor - 2.3.0 (25 December 2017)+ Image scale & dimension features were improved
+ Improved support of responsive design for scale & dimension features
+ Lazy load by visible content
* fixed undefined function issues
* fixed issued with the parser
* fixed issues with FPC
JS/CSS/HTML Compressor - 2.2.2 (12 October 2017)+ disable on amp pages
* js minify error fix
* file permission setting does not apply to scale images
* size tracking block appears twice
JS/CSS/HTML Compressor - 2.2.1 (06 October 2017)+ additional configuration options for image merge
+ minify improvement
* error with image scale
* error with image dimension
* incorrect compatibility with FPC
JS/CSS/HTML Compressor - 2.2.0 (12 Septemer 2017)+ Varnish support
+ EE FPC support
+ Merge images
+ ability to disable module by specific route
* unexpected message in system.log
Image Optimizer - 2.1.1 (12 Septemer 2017)+ more information for error description
* backup disabled if extension disabled in manual run
JS/CSS/HTML Compressor 2.1.0 (10 August 2017)+ ability to ignore merge of inline styles/scripts
+ support of CDN with different url regarding base url
+ knockout.js support
+ EE FPC support
* incorrect inline scripts when base url has subfolder
* js error when secure base url
* incorrect join of external css files
* incorrect result if js url has query
* some parser errors
* small bugfix
Image Optimizer 2.1.0 (10 August 2017)+ cronjob settings
+ file/folder permissions for new files
+ ability to manual start scanning/optimization
* logging error
* small bugfix
JS/CSS/HTML Compressor 2.0.2 (11 July 2017)+ default file/folder permission option added to settings
+ CDN support
* fix for SM_Market theme
* W3C validation fix
* utf8 fix
Image Optimizer 2.0.1 (11 July 2017)+ Ability to fast filesystem image search
+ Error logging improved
+ Compatibility with remote optimization service
+ Image grid improved
+ PNG optimization improved
+ JPEG quality system option
* ACL fix
* Fix for absent mime_content_type function
* Cronjob blocking other process
* Unexpected email notification to server administator
* Fix for incorrect scanning of images in filesystem
JS/CSS/HTML Compressor 2.0.1 (14 June 2017)* Fixed bug with incorrect paths of CSS files
2.0.0 (06 June 2017)+ Split to 2 extensions
+ Code refactoring
+ Extension logic changed - the extension has become more smart and flexible
+ Exclude scripts/styles from the extension settings
+ Serve scaled images
+ Image lazy load
+ Eliminate render-blocking CSS
+ Specify Image Dimensions
+ Inline small JS/CSS
1.6.1 (05 May 2017)+ Enable lossy JPEG compression from the extension settings (recommended jpeg compression by Google PageSpeed service)
* Pre-set options updated
* Exec function checker removed
1.6.0 (24 Feb 2017)+ HTML optimization (minify)
+ An option to choose cache directory for merged js/css files
1.5.1 (01 Dec 2016)* Bugfixes
1.5.0 (13 Oct 2016)+ Image Optimization Improvement:
+ Ability to set custom path to optimization libraries
+ Ability to set custom application options
1.4.2 (02 Aug 2016)* Bugfixes
1.4.1 (14 Jul 2016)* Bugfixes
1.4.0 (13 Jul 2016)+ Image Optimization Improved
1.3.0 (09 Nov 2015)* SUPEE-6788 security patch compatibility
1.2.0 (02 Jun 2015)+ Ability to move JS files to body end
+ x64 UNIX support for image optimization
+ Add 'defer' attribute to script tag improve
1.1.1 (29 Apr2015)+ Ability to ignore some scripts in defer parsing
1.1.0 (17 Mar 2015)+ Image optimization
* Small bugfix
* Code refactoring
* Performance and stability improvements
1.0.3 (17 Sep2014)* Bugfix
1.0.2 (26 Jun 2014)* Bugfix
1.0.1 (28 May 2014)* Big extension cache folder size problem fixed
1.0.0 (17 Mar 2014)The initial release
- We Recommend