Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Section


Column
width50%

Table of Contents

Warning

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.



Column
width30%


The Minifier extension is one of the solutions for optimizing your content in an online store powered by Magento 2. This extension compresses image size, converts images from PNG to JPG, automatically generates image titles. After optimization, all original images will be stored on the server for 30 days, in order of unsatisfactory result to do a rollback.

Compatibility: Magento Open Source 2.3.X - 2.4.X

Product Page


...

Command Line InstallationComposer Installation


Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database


Panel
borderWidth2px
borderStylesolid

2. Download the Minifier installation package


Panel
borderWidth2px
borderStylesolid

 3. Upload contents of the Minifier installation package to your store root directory


Panel
borderWidth2px
borderStylesolid

 4. In SSH console of your server navigate to your store root folder:

No Format
cd path_to_the_store_root_folder

run:

No Format
php -f bin/magento module:enable Aheadworks_Minifier

then:

No Format
php -f bin/magento setup:upgrade

after:

No Format
php -f bin/magento setup:static-content:deploy


Panel
borderWidth2px
borderStylesolid

5. Flush store cache; log out from the backend and log in again


Note

Make sure the installation is done from the FTP administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed.




Column
width50%


Panel
borderWidth2px
borderStylesolid

If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:

Panel
borderWidth2px
borderStylesolid

1. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

Run the following command:

Panel
borderWidth2px
borderStylesolid
composer config repositories.aheadworks composer https://dist.aheadworks.com/

On successful execution of the commands you will be able to use the composer to install the extensions.



Panel
borderWidth2px
borderStylesolid

To install the extension:

2. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder



Panel
borderWidth2px
borderStylesolid

 3. Run the following command to install the latest version of the extension:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-minifier

if you need to install a specific version, run this command:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-minifier:<version>


Tip

Specify the version of the extension in <version>


Panel
borderWidth2px
borderStylesolid

When prompted, enter Composer Public Key (Username) and Private Key (Password):


Note

Both Composer Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:

Image Modified



Panel
borderWidth2px
borderStylesolid

4. Enable the extension:

Panel
borderWidth2px
borderStylesolid
php -f bin/magento module:enable Aheadworks_Minifier

Next, register the extension:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:upgrade

Recompile your Magento store if you are in the Production mode:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:di:compile

To verify that the extension is enabled, run this command:

Panel
borderWidth2px
borderStylesolid
bin/magento module:status

Clean store cache, by running the following command:

Panel
borderWidth2px
borderStylesolid
bin/magento cache:clean

Log out and Log in the backend again.


Panel
borderWidth2px
borderStylesolid

To upgrade the extension:

5. To update or upgrade an extension:

Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.

If a composer package exists for the extension, run one of the following.


Code Block
titleUpdate per module name:
composer update aheadworks/module-minifier


Code Block
titleUpdater per version:
composer require aheadworks/module-minifier:<version>

Run the following commands to upgrade, deploy, and clean the cache.

Panel
borderWidth2px
borderStylesolid
php bin/magento setup:upgrade --keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean





Introducing Magento 2 Minifier


Section

The Minifier extension makes working in an online store as easy as possible by offering the following options:

  • Images compression

  • Manual or automatic image optimization

  • Lossy or lossless compression

  • Conversion from PNG to JPG

  • File names optimization

  • Page preview


General Information


Section

Authorizing to Buildify

Before starting to work with the extension you need to enter the authorization keys by going to Stores → Configuration → Aheadworks Extensions → Minifier. Two keys are required: Public and Private API.

Tip

You can find Public and Private API keys in My Projects and Licenses in personal account on aheadworks.com.

Enable prefetching

To enable prefetching in Minifier, set Enable to Yes. By default, this option is set to No. Minifier will track when a user is about to click on a link on your shop and load that link in the background.



Minifier on Backend

...

Section

The dashboard has four areas:

  • Images optimized
  • Image weight reduce by
  • Average product load time decreased by
  • File names optimized
Tip
titleHow does your website perform on various networks?

To find out how does your website performs on different networks, click on the question mark. In the table down below you will see information on how your average product page, as well as the entire store, would perform on two most commonly used networks - 4G and household WiFi.

Clicking on the Review us button you will be automatically redirected to the Minifier product page on Shopify app store.

Settings Configuration

The Automatic optimization service tab provides information about the number of already optimized images. For changing optimization configurations click on Edit setting.

Tip

Automatic optimization process goes via the Kraken. Where customers’ images are processed in order and loaded back in the amount of 250 images at a time.

The settings area allows to configure the following:

  • lossy or lossless kind of compression - lossy compression will reduce the image size by up to 70%, losing a little in quality; lossless compression will reduce the image size by up to 30%
  • optimize only published products - Minifier will skip images that don't need to be optimized, which will speed up the optimization process
  • convert files to JPG - images saved in JPG load faster than in PNG
  • skip previously optimized images - previously compressed images will not be compressed
  • optimize file names automatically - for higher search engine rankings, filenames must be supplied by keywords. If this configuration is switched on, Minifier will combine image titles from the file data such as PRODUCT TYPE and PRODUCT TITLE. When PRODUCT TYPE is unavailable, the image title will be made from PRODUCT TITLE only.

After clicking on the Save settings button new settings will be saved and will be used in the future for the auto-optimization process for not optimized store pictures.

Note

When the new settings are saved, auto-optimization process will start immediately. 


Optimization performance

The images optimized graph introduces the information on the extension usage. Choose the needed period to check the number of optimized images during it.

The Optimization History area contains the following columns:

  • Type – the name of the report
  • Status – the condition of an optimization process:
    • collecting;
    • collected;
    • optimizing;
    • optimized;
    • pushing;
    • done;
    • reverting;
    • reverted;
    • not enough images left;
    • shop deleted Minifier;
    • no new images found.
  • Date – when optimization was complete
  • Images – how many images were optimized
  • Saved – how much space was saved after optimization.

To view the report on optimization click on the link. The report describes the detailed information on:

  • Created date
  • Closed date
  • Collected images
  • Previously optimized images
  • Images optimized using lossy algorithm
  • Optimized images published to the store
  • Saved KBs

Knowledge Base

The Frequently Asked Questions area introduces answers for most asked questions about the working process in Minifier.

  • Lossless or lossy. Which one to use?

  • If I stop using Minifier, what will happen to my images?
  • Why are file names important?
  • What is the difference between auto-optimization plans?
  • What if I don’t like changes?
  • Why do I need to browse my store after enabling prefetch?
  • For detailed information click on one of the following questions.

...