1

I am coding an extension for Magento 1.9. Now I need an image in my template. Where (which folder) should I store it? And how to access it with an <img>-tag?

1

You should place the images in the skin folder under the base/default theme.
skin/frontend/base/default/images/{your_extension_name}/image.png.
Then access it as:

<img src="<?php echo $this->getSkinUrl('images/{your_extension_name}/image.png')?>" alt="" />

If the image is for admin section, then store it in skin/adminhtml/default/default/images/{your_extension_name}/image.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.