0

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 ? – Dinesh Yadav Oct 11 '17 at 10:28
  • no .htaccess file in pub/media./ – Puneet Oct 11 '17 at 10:29
  • that's the reason. Put .htaccess file from default magento. – Dinesh Yadav Oct 11 '17 at 10:30
  • but I have deleted the pub folder and regenerating it . – Puneet Oct 11 '17 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 . – Dinesh Yadav Oct 11 '17 at 10:45
0

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 '17 at 10:42
  • You need do custom code and also check file permission – Amit Bera Oct 11 '17 at 10:46
  • Please check @rakesh blog magento.stackexchange.com/questions/134360/… for generate resize image – Amit Bera Oct 11 '17 at 10:47
  • your command doesn't worked – Puneet Oct 11 '17 at 10:53
  • @amrit bera do you have any other suggestion – Puneet Oct 11 '17 at 11:10
0

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

https://github.com/magento/magento2/blob/2.1/pub/media/.htaccess

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.