dilusha100 - 3 weeks ago

My module has image and I need to show it in the index page. basically I tried to use {{ package.image.make.class("card-img-top").fit(300,300) | raw }} it doesn't show anything ( there is no error also). First I though this is a problem with users permission on his role but then I realize that even admin can't see the images.

So, I'm I in correct path or is there any better way to do this?

Answer

dilusha100 - 3 weeks ago

Thank you for your support. But it's not worked for me. but I found this as solution <img src="/files/images/{{ package.image.name}}" alt="">

edster - 3 weeks ago

you need to add .render or image to the end of that to actually output via the presenter. Otherwise you are just modifing the image object without outputting.

dilusha100 - 3 weeks ago

Thank you for your support. But it's not worked for me. but I found this as solution <img src="/files/images/{{ package.image.name}}" alt="">