Explore information related to magento error

Icons images and javascript files missing from frontend in Magento - Fix it now

This article covers methods to resolve Magento error related to with icons, images, and javascript files missing from frontend. Basically, icons, images, and javascript files might not appear if we use the wrong Magento update command to upgrade the version.


If you are in production mode, and are running setup:upgrade and you don't want regenerate static content because there is no need to, then you can use the following:

php bin/magento setup:upgrade --keep-generated

--keep-generated is an optional argument that does not update static view files. 

It should be used only in production mode. 

It should not be used in developer mode.


Solutions for the issue where stylesheets and images do not load after installing Magento ?

The following are possible solutions depending on the software you use and the cause of the problem:

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:

The include directive must point to the sample nginx configuration file in your Magento installation directory. For example:

include /var/www/html/magento2/nginx.conf.sample;

The server_name directive must match the base URL you specified when installing Magento. For example:

server_name ip_address;

If the Magento application is in production mode, try deploying static view files using the command magento setup:static-content:deploy.

Read More