Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to set magento 2 project loading image on while page loader.

We have provided very easy step and simple code for your Magento 2 project while page loading.

Step 1. Open your "copyright.phtml" and add this
after tag.
    (Please add this "copyright.phtml" file in this path : Magento_Theme\templates\html)

Step 2. Add this following code.

 

Step 3. Add this following CSS in your stylesheet.(please create loader image like gif,svg)

 .loader{position:fixed;left:0;top:0;width:100%;height:100%;z-index:99999999;background:url(../images/pageLoader.svg) 50% 50% no-repeat #000}  

Step 4. Please clean cache: php bin/magento cache:clean

Now refresh your page and show result.

Note : if this example not works please add this jquery :
 


This post first appeared on Smita-tech, please read the originial post: here

Share the post

How to set magento 2 project loading image on while page loader.

×

Subscribe to Smita-tech

Get updates delivered right to your inbox!

Thank you for your subscription

×