Skip to content

static image doesn’t show in checkout page magento 2.4

I was override Magento_Checkout/shipping-address/shipping-method-item static html file with Vendor_Module/checkout/shipping/shipping-method-item static html file.

now I wants to set static image URL in this shipping-method-item file. So, I put that static image at app/code/Vendor/Module/view/frontend/web/images/location.png.

then I mention code as like below in shipping-method-item file

<img data-bind="attr: { src: require.toUrl('Microtech_Storepickup::images/location.png') }" alt="">

but it doesn’t generate any path for image.

even I tried as like below

<img data-bind="attr: { src: require.toUrl('images/location.png') }" alt="">

then it generate path as like below

domain.com/static/version1663150096/frontend/Vendor_Name/Theme_Name/en_US/images/location.png

I doesn’t have any idea about how to show image from my custom module path app/code/Vendor/Module/view/frontend/web/images/location.png

please help me…