4

I did a custom module and added a custom css. All worked fine, but this css has some images linked directly like: background-image:url(./img/digit-sm.png);. And obviously has its folder img on the same level.

So I decided to change these path to ./../images/digit-sm.png and put the img folder on (renaming it):

app/code/vendor/module/view/frontend/web/images

The problem is magento can't find these images, but the url is correct:

http://vmagento.box/pub/static/frontend/Magento/luma/es_ES/images/digit-sm.png

So I looked inside this folder and there aren't these images. Why? I tried everything, every command, upgrade, compile, static-deploy, cache and nothing. I need to do something more? How can I indicate magento to copy these files on pub/static?

If I put manually these images everything works like a charm.

asked Dec 1, 2016 at 15:53
3
  • 1
    did you find solution? Commented Jan 23, 2017 at 13:41
  • Nope... I changed the library for one that doesn't need images, so gave up this, are u trying to do something similar? Commented Jan 23, 2017 at 14:14
  • I've an image in my custom module web/images. Which I'm using in Adminhtml layout <argument name="logo_image_src" xsi:type="string">images/custom-admin-logo.png</argument> Commented Jan 24, 2017 at 4:58

1 Answer 1

0

I answer my own question, I think this was a newbie mistake, maybe because I didn't deploy static files, permissions problemes, cache, etc.

I didn't have this problem anymore

answered Nov 8, 2017 at 15:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.