Magento 2 product images not showing, 2 different directories












4














Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory and with the installation.



I imported the products with Storemanager Emagicone, images were in import file (in root/media and pub/media because i did not know which to use),



Product images are in the front referring to a wrong path:



/media/catalog/product/cache/1/small_image/400x533/beff4985b56e3afdbeabfc89641a4582/y/o/yorkshire


When I look in FTP, the images are in pub/media/catalog/product. The above-mentioned directory is totally empty.



Moving the files from root/pub/media to root/media solved partially the problem. All basic images show up, but product images are not showing at all.



I already tried:php bin/magento setup:di:compile and php bin/magento setup:static-content:deployand php bin/magento cache:clean and php bin/magento indexer:reindex



The file permissions and user owner are OK, also i deleted all from ROOT > pub > static > EXCEPT .HTACCESS. I also deleted folder in: pub/static
var/cache, var/view_preprocessed/css/frontend/ , ..source/frontend



I also looked in di.xml MagentoFrameworkAppViewAssetMaterializationStrategyCopy



No symlinks!










share|improve this question
























  • Did you manage to fix this. Please provide the answer.
    – Stevie G
    Nov 9 '16 at 10:57










  • Did you check your store configuration? I guess you didnt set your media path or even when, false.
    – David Lambauer
    Dec 23 '16 at 20:22
















4














Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory and with the installation.



I imported the products with Storemanager Emagicone, images were in import file (in root/media and pub/media because i did not know which to use),



Product images are in the front referring to a wrong path:



/media/catalog/product/cache/1/small_image/400x533/beff4985b56e3afdbeabfc89641a4582/y/o/yorkshire


When I look in FTP, the images are in pub/media/catalog/product. The above-mentioned directory is totally empty.



Moving the files from root/pub/media to root/media solved partially the problem. All basic images show up, but product images are not showing at all.



I already tried:php bin/magento setup:di:compile and php bin/magento setup:static-content:deployand php bin/magento cache:clean and php bin/magento indexer:reindex



The file permissions and user owner are OK, also i deleted all from ROOT > pub > static > EXCEPT .HTACCESS. I also deleted folder in: pub/static
var/cache, var/view_preprocessed/css/frontend/ , ..source/frontend



I also looked in di.xml MagentoFrameworkAppViewAssetMaterializationStrategyCopy



No symlinks!










share|improve this question
























  • Did you manage to fix this. Please provide the answer.
    – Stevie G
    Nov 9 '16 at 10:57










  • Did you check your store configuration? I guess you didnt set your media path or even when, false.
    – David Lambauer
    Dec 23 '16 at 20:22














4












4








4







Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory and with the installation.



I imported the products with Storemanager Emagicone, images were in import file (in root/media and pub/media because i did not know which to use),



Product images are in the front referring to a wrong path:



/media/catalog/product/cache/1/small_image/400x533/beff4985b56e3afdbeabfc89641a4582/y/o/yorkshire


When I look in FTP, the images are in pub/media/catalog/product. The above-mentioned directory is totally empty.



Moving the files from root/pub/media to root/media solved partially the problem. All basic images show up, but product images are not showing at all.



I already tried:php bin/magento setup:di:compile and php bin/magento setup:static-content:deployand php bin/magento cache:clean and php bin/magento indexer:reindex



The file permissions and user owner are OK, also i deleted all from ROOT > pub > static > EXCEPT .HTACCESS. I also deleted folder in: pub/static
var/cache, var/view_preprocessed/css/frontend/ , ..source/frontend



I also looked in di.xml MagentoFrameworkAppViewAssetMaterializationStrategyCopy



No symlinks!










share|improve this question















Magento2 is looking directly in the root folder for media and static files. It is not looking in pub/media folder. Product images are not showing in the front. I installed Magento 2 in a subdirectory and with the installation.



I imported the products with Storemanager Emagicone, images were in import file (in root/media and pub/media because i did not know which to use),



Product images are in the front referring to a wrong path:



/media/catalog/product/cache/1/small_image/400x533/beff4985b56e3afdbeabfc89641a4582/y/o/yorkshire


When I look in FTP, the images are in pub/media/catalog/product. The above-mentioned directory is totally empty.



Moving the files from root/pub/media to root/media solved partially the problem. All basic images show up, but product images are not showing at all.



I already tried:php bin/magento setup:di:compile and php bin/magento setup:static-content:deployand php bin/magento cache:clean and php bin/magento indexer:reindex



The file permissions and user owner are OK, also i deleted all from ROOT > pub > static > EXCEPT .HTACCESS. I also deleted folder in: pub/static
var/cache, var/view_preprocessed/css/frontend/ , ..source/frontend



I also looked in di.xml MagentoFrameworkAppViewAssetMaterializationStrategyCopy



No symlinks!







magento2 product-images 404-page






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 13:34









Evince Development

1,060318




1,060318










asked Oct 8 '16 at 16:37









Anita

2114




2114












  • Did you manage to fix this. Please provide the answer.
    – Stevie G
    Nov 9 '16 at 10:57










  • Did you check your store configuration? I guess you didnt set your media path or even when, false.
    – David Lambauer
    Dec 23 '16 at 20:22


















  • Did you manage to fix this. Please provide the answer.
    – Stevie G
    Nov 9 '16 at 10:57










  • Did you check your store configuration? I guess you didnt set your media path or even when, false.
    – David Lambauer
    Dec 23 '16 at 20:22
















Did you manage to fix this. Please provide the answer.
– Stevie G
Nov 9 '16 at 10:57




Did you manage to fix this. Please provide the answer.
– Stevie G
Nov 9 '16 at 10:57












Did you check your store configuration? I guess you didnt set your media path or even when, false.
– David Lambauer
Dec 23 '16 at 20:22




Did you check your store configuration? I guess you didnt set your media path or even when, false.
– David Lambauer
Dec 23 '16 at 20:22










4 Answers
4






active

oldest

votes


















5














For individual product, try saving the product in admin without any change.



For all products, try running the following command (this will take some time to complete):



php bin/magento catalog:images:resize





share|improve this answer































    1














    Please make sure to double check owner and group of pub/media directory.



    You may run this command from magento root directory:



    sudo chown www-data:www-data -R pub/media


    Assuming www-data is used as Apache user.



    Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.



    Hope it helps.






    share|improve this answer





























      0














      I have tried everything but no luck. This article finally helped me fix issue



      https://support.magento.com/hc/en-us/articles/115002446014-Product-images-are-not-displayed-although-set-on-the-Product-Edit-page



      All you need to do is login to your db via phpMyAdmin (or similar), go to catalog_product_entity_varchar, search for records with value LIKE "no", you will find that few images may have no_selection as their value. Just remove all of those records.



      Images should then display correctly






      share|improve this answer





























        0














        1) Open di.xml from appetcdi.xml



        2) Search by MagentoFrameworkAppViewAssetMaterializationStrategySymlink and use word Copy instead of Symlink so the final string will be



        MagentoFrameworkAppViewAssetMaterializationStrategyCopy


        3) Save this file and remove everything from pub/static except .htacess



        4) Through CMD. Clear your cache
        5) Flush your cache
        6) Do Reindexing



        This time, images should be loaded.






        share|improve this answer























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f140009%2fmagento-2-product-images-not-showing-2-different-directories%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          For individual product, try saving the product in admin without any change.



          For all products, try running the following command (this will take some time to complete):



          php bin/magento catalog:images:resize





          share|improve this answer




























            5














            For individual product, try saving the product in admin without any change.



            For all products, try running the following command (this will take some time to complete):



            php bin/magento catalog:images:resize





            share|improve this answer


























              5












              5








              5






              For individual product, try saving the product in admin without any change.



              For all products, try running the following command (this will take some time to complete):



              php bin/magento catalog:images:resize





              share|improve this answer














              For individual product, try saving the product in admin without any change.



              For all products, try running the following command (this will take some time to complete):



              php bin/magento catalog:images:resize






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 10 '17 at 8:06

























              answered May 10 '17 at 8:00









              Mukesh Chapagain

              3,65912241




              3,65912241

























                  1














                  Please make sure to double check owner and group of pub/media directory.



                  You may run this command from magento root directory:



                  sudo chown www-data:www-data -R pub/media


                  Assuming www-data is used as Apache user.



                  Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.



                  Hope it helps.






                  share|improve this answer


























                    1














                    Please make sure to double check owner and group of pub/media directory.



                    You may run this command from magento root directory:



                    sudo chown www-data:www-data -R pub/media


                    Assuming www-data is used as Apache user.



                    Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.



                    Hope it helps.






                    share|improve this answer
























                      1












                      1








                      1






                      Please make sure to double check owner and group of pub/media directory.



                      You may run this command from magento root directory:



                      sudo chown www-data:www-data -R pub/media


                      Assuming www-data is used as Apache user.



                      Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.



                      Hope it helps.






                      share|improve this answer












                      Please make sure to double check owner and group of pub/media directory.



                      You may run this command from magento root directory:



                      sudo chown www-data:www-data -R pub/media


                      Assuming www-data is used as Apache user.



                      Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.



                      Hope it helps.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 9 '16 at 20:29









                      Max Pronko

                      1,456817




                      1,456817























                          0














                          I have tried everything but no luck. This article finally helped me fix issue



                          https://support.magento.com/hc/en-us/articles/115002446014-Product-images-are-not-displayed-although-set-on-the-Product-Edit-page



                          All you need to do is login to your db via phpMyAdmin (or similar), go to catalog_product_entity_varchar, search for records with value LIKE "no", you will find that few images may have no_selection as their value. Just remove all of those records.



                          Images should then display correctly






                          share|improve this answer


























                            0














                            I have tried everything but no luck. This article finally helped me fix issue



                            https://support.magento.com/hc/en-us/articles/115002446014-Product-images-are-not-displayed-although-set-on-the-Product-Edit-page



                            All you need to do is login to your db via phpMyAdmin (or similar), go to catalog_product_entity_varchar, search for records with value LIKE "no", you will find that few images may have no_selection as their value. Just remove all of those records.



                            Images should then display correctly






                            share|improve this answer
























                              0












                              0








                              0






                              I have tried everything but no luck. This article finally helped me fix issue



                              https://support.magento.com/hc/en-us/articles/115002446014-Product-images-are-not-displayed-although-set-on-the-Product-Edit-page



                              All you need to do is login to your db via phpMyAdmin (or similar), go to catalog_product_entity_varchar, search for records with value LIKE "no", you will find that few images may have no_selection as their value. Just remove all of those records.



                              Images should then display correctly






                              share|improve this answer












                              I have tried everything but no luck. This article finally helped me fix issue



                              https://support.magento.com/hc/en-us/articles/115002446014-Product-images-are-not-displayed-although-set-on-the-Product-Edit-page



                              All you need to do is login to your db via phpMyAdmin (or similar), go to catalog_product_entity_varchar, search for records with value LIKE "no", you will find that few images may have no_selection as their value. Just remove all of those records.



                              Images should then display correctly







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Dec 28 '18 at 12:45









                              Thomas Grabarczyk

                              112




                              112























                                  0














                                  1) Open di.xml from appetcdi.xml



                                  2) Search by MagentoFrameworkAppViewAssetMaterializationStrategySymlink and use word Copy instead of Symlink so the final string will be



                                  MagentoFrameworkAppViewAssetMaterializationStrategyCopy


                                  3) Save this file and remove everything from pub/static except .htacess



                                  4) Through CMD. Clear your cache
                                  5) Flush your cache
                                  6) Do Reindexing



                                  This time, images should be loaded.






                                  share|improve this answer




























                                    0














                                    1) Open di.xml from appetcdi.xml



                                    2) Search by MagentoFrameworkAppViewAssetMaterializationStrategySymlink and use word Copy instead of Symlink so the final string will be



                                    MagentoFrameworkAppViewAssetMaterializationStrategyCopy


                                    3) Save this file and remove everything from pub/static except .htacess



                                    4) Through CMD. Clear your cache
                                    5) Flush your cache
                                    6) Do Reindexing



                                    This time, images should be loaded.






                                    share|improve this answer


























                                      0












                                      0








                                      0






                                      1) Open di.xml from appetcdi.xml



                                      2) Search by MagentoFrameworkAppViewAssetMaterializationStrategySymlink and use word Copy instead of Symlink so the final string will be



                                      MagentoFrameworkAppViewAssetMaterializationStrategyCopy


                                      3) Save this file and remove everything from pub/static except .htacess



                                      4) Through CMD. Clear your cache
                                      5) Flush your cache
                                      6) Do Reindexing



                                      This time, images should be loaded.






                                      share|improve this answer














                                      1) Open di.xml from appetcdi.xml



                                      2) Search by MagentoFrameworkAppViewAssetMaterializationStrategySymlink and use word Copy instead of Symlink so the final string will be



                                      MagentoFrameworkAppViewAssetMaterializationStrategyCopy


                                      3) Save this file and remove everything from pub/static except .htacess



                                      4) Through CMD. Clear your cache
                                      5) Flush your cache
                                      6) Do Reindexing



                                      This time, images should be loaded.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited yesterday









                                      Rama Chandran M

                                      2,71381430




                                      2,71381430










                                      answered yesterday









                                      zuber bandi

                                      493




                                      493






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Magento Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.





                                          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                          Please pay close attention to the following guidance:


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f140009%2fmagento-2-product-images-not-showing-2-different-directories%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          An IMO inspired problem

                                          Management

                                          Has there ever been an instance of an active nuclear power plant within or near a war zone?