We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Image setting

Hi, I know it may sound silly, but I can not place my image so that it appears in all my pages,

I defined it like this: {{link_to("index", '<img src="./img/logo2.png"/>')}} https://www.image-heberg.fr/files/15223445661196940989.png

but I have this problem:

https://www.image-heberg.fr/files/1522344549376040662.png https://www.image-heberg.fr/files/1522344511418396274.png

is there a way to set it to display properly in all pages?

Never use relative path for anything better use absolute {{link_to("index", '<img src="/img/logo2.png"/>')}}

Good luck

edited Mar '18

Never use relative path for anything better use absolute {{link_to("index", '<img src="/img/logo2.png"/>')}}

Good luck

I tried but it does not work , My image is no longer displayed on any pages. I do not know if I have to define anything before doing this, I do not understand very well how the program finds the different files

https://www.image-heberg.fr/files/1522347458136255886.png

https://www.image-heberg.fr/files/15223473071669650262.png //i rename my image in logo.png //

config : https://www.image-heberg.fr/files/15223476661538396497.png https://www.image-heberg.fr/files/15223476911401187291.png

index.php: https://www.image-heberg.fr/files/15223477131525919632.png

I do not understand because my link css works and it's almost the same path : https://www.image-heberg.fr/files/15223473631743209021.png



43.9k

Hi,

did you try:

{{ link_to("index", image("img/logo2.png") }}