Question

I need to set images from the Magento media folder but index.php keeps getting in the way and since I'm going to be moving this dev site to another production URL, I can't just use hard paths in this case.

In Wordpress/Drupal I can set a link like <img src="<?php echo home_url(); ?>/media/image-name.jpg" /> but I can't find anything similar to that for Magento.

I'm needing this for the static blocks section if that makes a difference. When I try to set relative links to http://mysite.com/media/image-name.jpg I end up with http://mysite.com/index.php/media/image-name.jpg which of course results in 404.

What do I need to put in static blocks that will reference the main site without the index.php?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top