Question

I have downloaded and installed latest version of magento(2.3.0) with sample data , everything went smooth but i am getting images are broken links, tried with both installing through sample-data repository and download by sample data zip file. but same issue i am facing.

Note: while installing through composer update getting issue with downloadable-sample-data as it is not available in http://packagist.org

Was it helpful?

Solution

I fixed issue with by running "bin/magento catalog:images:resize". based on inputs from given link. What does catalog:images:resize do in magento 2? few other errors i faced while installing magento 2.3 Js/css files appending versions : fixed by running

    step :1 
        INSERT INTO `core_config_data`
            (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0',
            'dev/static/sign', '0'); 
 step:2
        bin/magento cache:clean

OTHER TIPS

Note: while installing through composer update getting issue with downloadable-sample-data as it is not available

Solution

  • Do not install sample data if your Magento application is set for production mode. Switch to developer mode first. Installing sample data in production mode fails.

php <your Magento install dir>/bin/magento sampledata:deploy

Reference

After installing, images and stylesheets do not load; only text displays, no graphics

Reference

Details

The path to images and stylesheets is not correct, either because of an incorrect base URL or because server rewrites (CentOS, Ubuntu) are not set up properly. To confirm this is the case, use a web browser inspector to check the paths to static assets and verify those assets are located on the Magento file system.

Magento static assets are located under <your Magento install dir>/pub/static/, within the frontend and adminhtml directories).

Solution

  • If you are using the Apache web server, verify your server rewrites setting and your Magento server’s base URL and try again. If you set up the Apache AllowOverride directive incorrectly, the static files are not served from the correct location.
  • If you are using the nginx web server, be sure to configure a virtual host file. The nginx virtual host file must meet the following criteria:
  • If the Magento application is in production mode, try deploying static view files using the command

php bin/magento setup:static-content:deploy

Sometime images don't populate if cached version is not properly created.

Below way worked for me

  • rm -rf pub/media/catalog/product/cache/*
  • bin/magento catalog:images:resize
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top