I am running static content deployment command but unfortunately its not generating the media in pub folder Magento version 2.1.0

  • Is .htaccess file exist in your pub/media/ folder ? Oct 11, 2017 at 10:28
  • no .htaccess file in pub/media./
    – Puneet
    Oct 11, 2017 at 10:29
  • that's the reason. Put .htaccess file from default magento. Oct 11, 2017 at 10:30
  • but I have deleted the pub folder and regenerating it .
    – Puneet
    Oct 11, 2017 at 10:38
  • never delete the whole pub folder. .htaccess file is not recoverable. Now you have to download .htaccess file and paste it into pub folder. You can check my answer below . Oct 11, 2017 at 10:45

2 Answers 2


Static content deploy comment does not generate cache catalog image. Only geneses static content means css , js html ,less.

For generate cache images you should use

php bin/magento catalog:images:resize

  • then how to fix the image issue as not catalog images are generating
    – Puneet
    Oct 11, 2017 at 10:42
  • You need do custom code and also check file permission
    – Amit Bera
    Oct 11, 2017 at 10:46
  • Please check @rakesh blog magento.stackexchange.com/questions/134360/… for generate resize image
    – Amit Bera
    Oct 11, 2017 at 10:47
  • your command doesn't worked
    – Puneet
    Oct 11, 2017 at 10:53
  • @amrit bera do you have any other suggestion
    – Puneet
    Oct 11, 2017 at 11:10

Put .htaccess file from this url in your pub/media folder


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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