I had a typo on file name. M2 only includes images if they are being used.

On my computer all images from mythemes/web/images folder are under

/pub/static/frontend/Training/default/images (right side of screenshot),

But when I visit the site and check sources (left side of screenshot) there aren't any images from my theme there.

Any idea why?

enter image description here

3 Answers 3


Please disable cache using command

php bin/magento cache:disable

delete all file and folders from pub/static and var (don't delete .htaccess) using command

rm -rf pub/static/ * 
rm -rd var/*

run command for deploay magento files

php bin/magento setup:static-content:deploy

and provide permission to pub/static and var as 755

 chmod -R 755 pub/static var

Please note some commands might not work in Windows Operating System

  • I was already doing that before. It didn't help. Do I need to include those images in some .xml file or something?
    – rits
    Jan 31, 2017 at 12:24
  • Commands I ran sudo rm -rf var/* , sudo rm -rf pub/static/* , sudo bin/magento setup:static-content:deploy , sudo chmod -R 777 /var/www/html/mg
    – rits
    Jan 31, 2017 at 12:30

@parasarora1303 is right but I'd like to add one more thing here and that is to remember to add your site locale whilst deploying the content.

By default, magento locale is set to en_US but if you have set the default local to let's say en_GB then the static content will only be deployed for en_US.

Run the following to deploy static content for your local.

php bin/magento setup:static-content:deploy en_GB


php bin/magento setup:static-content:deploy {Your_SET_LOCALE}
  • It is en_US and I already tried those commands before.
    – rits
    Jan 31, 2017 at 12:30
  • I have provided the general commands. If web has multi languages then they need to mention all languages with space like php bin/magento setup:static-content:deploy en_GB en_US Jan 31, 2017 at 12:53

I had a typo on file name. M2 only includes images if they are being used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.