Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Image url in static block
 
Kimura
Member
 
Avatar
Total Posts:  48
Joined:  2008-04-21
Hungary
 

Hello

I’v got a problem. I did a lot of places in the template, where statick blicks shown. I want to put images to the block, what are in the media directory, but I can only put this image this way to the block:

<img src="http://192.168.16.131/magento/media/ico/fejvedo.gif">

I’ve tried a lot of url types, but no one works. We will change the server, when we done, and I don’t want to rewrite by hand all the url-s like this. Has any other solution to link images in magento?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Joachim
Sr. Member
 
Avatar
Total Posts:  133
Joined:  2008-01-23
Netherlands
 

Hi Kimura, doesn’t

{{store url='media/ico/fejvedo.gif}}
work?
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kimura
Member
 
Avatar
Total Posts:  48
Joined:  2008-04-21
Hungary
 

No, when I inspet it, this code come:

<img src="http://192.168.16.131/magento/index.php/media/ico/fejvedo.gif/?___store=default"/>

:S

with: this:

<img src="{{store url=}}media/ico/fejvedo.gif"

==

<
img src="http://192.168.16.131/magento/index.php/=/index/index/?___store=defaultmedia/ico/fejvedo.gif"/>

the same, it’s insert the index.php url

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lenny2
Sr. Member
 
Total Posts:  171
Joined:  2008-05-21
München
 

same problem here - does somebody knows the correct syntax?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

This

Kimura -

<img src="{{store url=}}media/ico/fejvedo.gif">

is not the same as this

Joachim -

{{store url=media/ico/fejvedo.gif}}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Lenny2
Sr. Member
 
Total Posts:  171
Joined:  2008-05-21
München
 

joyously,
kimura wrote that already. However it is not working:

<p><img src="{{store url=media/informationen/logos/o2_can_do-medium.jpg}}"/>
result is an not showing pic with the following url:

http://mydomain.com/media/informationen/logos/?___store=ds_deutsch

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
antonio2604
Sr. Member
 
Avatar
Total Posts:  123
Joined:  2008-07-16
Osnabrück
 

<img scr="{{skin url=images/media/neuheiten.jpg}}” width="473" height="157"/>

this script works

smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

It does not work for me.

I want to put about_us_img.jpg into my About Us CMS page as you said:

<img scr="{{skin url=images/media/about_us_img.jpg}}” width="220" height="180"/>

But nothing happens. Well yes, look at my firebug report:

<img height="180" 220="" scr="http://localhost/magento/skin/frontend/default/my_theme/images/media/about_us_img.jpg” width="/>

Very weird!!!

How is the right way???

 
Magento Community Magento Community
Magento Community
Magento Community
 
cathyka
Member
 
Total Posts:  62
Joined:  2008-04-03
 

try

<img scr="{{skin url=images/media/about_us_img.jpg}}” width="220" height="180"/>

I find image linking tricky in the static blocks.

This worked fine in the shop but not in the cart.

<img src="skin/frontend/default/joys/images/image.gif" />

So I replaced it with this and all was well

<img src="{{skin url=’images/image.gif’}}” />

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrmeech
Member
 
Total Posts:  58
Joined:  2008-11-07
New York City, USA
 

I got my images in static blocks to work by moving the “ marks as seen below. Basically they hug the path instead of going outside of the brackets.

<img src={{skin url="images/your_amazing_image.gif"}}  />
 
Magento Community Magento Community
Magento Community
Magento Community
 
thunderhawk6630
Jr. Member
 
Total Posts:  4
Joined:  2008-08-25
 

mrmeech’s method above works perfect

 
Magento Community Magento Community
Magento Community
Magento Community
 
Peppermay
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-10-18
Lille, France
 

Yep… Without any space after url…

 
Magento Community Magento Community
Magento Community
Magento Community
 
topsuppl
Jr. Member
 
Total Posts:  14
Joined:  2009-01-16
 

I HAVE TRIED EVERYTHING BUT NO FILE PATH SEEMS TO WORK

My Filepath is as follows :

<img src={{skin url="http://wwwmysite.com/home/username/public_html/media/image.jpg"}} />

 
Magento Community Magento Community
Magento Community
Magento Community
 
Peppermay
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-10-18
Lille, France
 

Hi.
Well, I think that “skin url” is a kind of alias for Magento engine to find the relative url of your design/current_skin directory. As you seem to use an absolute url, you maybe try to completly remove the {{skin url= and the }}.

 
Magento Community Magento Community
Magento Community
Magento Community
 
GodRJa
Jr. Member
 
Total Posts:  22
Joined:  2008-04-28
 

Please take a look at this page, maybe it can help.

http://www.magentocommerce.com/wiki/how-to/how_to_add_resource_urls_to_cms_pages_for_resources_not_in_skin_folder

 
Magento Community Magento Community
Magento Community
Magento Community
 
Distantskunk
Jr. Member
 
Total Posts:  5
Joined:  2009-03-10
 
mrmeech - 21 November 2008 08:50 PM

I got my images in static blocks to work by moving the “ marks as seen below. Basically they hug the path instead of going outside of the brackets.

<img src={{skin url="images/your_amazing_image.gif"}}  />

YES!  That did it!  Thank you. cheese

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2