0

I'm writing a callback module and when i try to insert image like following:

        a#popup-button{
        display: block;
        width: 50px;
        height: 50px;
        background: url("../images/phone-icon.png") no-repeat;
        background-size: contain;
        background-position: center center;
        font-size: 0;
    }

I get enter image description here

  • Did you run frontend deployment after adding image? – Muhammad Anas Mar 26 at 10:59
  • can you check if image is there in pub/static/frontend/Magento/luma/en_US/images? – Muhammad Anas Mar 26 at 11:00
  • @MuhammadAnas no, but it's static – dukir Mar 26 at 11:01
  • 1
    You need to run static deploy command, it will create a copy of image in required directory – Muhammad Anas Mar 26 at 11:02
0

once try with bellow code

<img src="https://example.com/pub/media/social/whatsapp_new.jpg" style="margin: 0px 3px -5px 5px;" alt="call back">+91 </span>
0

Place your image at below location

magento_root\app\design\frontend\Vendor\theme\web\images

Put below code into your .css file

body{
    background: url('../images/brushed_alu.png')top center;
}

Put .css file of your theme at below location

magento_root\app\design\frontend\Vendor\theme\web\css\style.css(your .css file)

After that run below commands from your root directory of Magento

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:flush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.