0

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

Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
asked Oct 11, 2017 at 10:25
10
  • Is .htaccess file exist in your pub/media/ folder ? Commented Oct 11, 2017 at 10:28
  • no .htaccess file in pub/media./ Commented Oct 11, 2017 at 10:29
  • that's the reason. Put .htaccess file from default magento. Commented Oct 11, 2017 at 10:30
  • but I have deleted the pub folder and regenerating it . Commented 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 . Commented Oct 11, 2017 at 10:45

2 Answers 2

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

answered Oct 11, 2017 at 10:34
5
  • then how to fix the image issue as not catalog images are generating Commented Oct 11, 2017 at 10:42
  • You need do custom code and also check file permission Commented Oct 11, 2017 at 10:46
  • Please check @rakesh blog magento.stackexchange.com/questions/134360/… for generate resize image Commented Oct 11, 2017 at 10:47
  • your command doesn't worked Commented Oct 11, 2017 at 10:53
  • @amrit bera do you have any other suggestion Commented Oct 11, 2017 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

answered Oct 11, 2017 at 10:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.