How to download required media files for a category or product on demand?

Suppose you got some Magento tasks like: – Re/designing a theme – Modifying a category or product page

In this case, Do you download all the media files?

Even if you decided to download all the media files? – Do you have sufficient storage? – Do you have enough patience to wait for the entire download?

Of course, not. That’s why I have created a utility bash script, which helps developer to quickly download the required images for category or product on demand via tool called “Magento 2 Media Downloader”:


You can simply download the script file and give the executable permission. curl -0 -o chmod +x To make it system-wide command (recommended) “` mv ~/bin/m2-media-downloader


mv /usr/local/bin/m2-media-downloader



To display help cd /path/to/magento2 m2-media-downloader --help ![M2 Media Downloader Help](

Note: You have to run the command from Magento 2 root directory

To download the category images m2-media-downloader --type=category --id=<categoryId>

To download the product images m2-media-downloader --type=product --id=<productId>

To update the script m2-media-downloader --update

submitted by /u/MagePsycho
[link] [comments]