i have just cloned my website and then updated the cloned website. Everything works perfec except the images for my sub categories isnt showing up, my product images are just not the sub category images.

My code for looks like this:

<div class="subcategory-products">

<ul class="products-grid two_columns_5">
$categorycount = 0;
foreach ($_categories as $_category):
$layer = Mage::getSingleton('catalog/layer');
$catName = $this->getCurrentCategory()->getName();
if ($categorycount == 0){
$class = "first";
elseif ($categorycount == 3){
$class = "last";
$class = "";
<li class="item <?=$class?>">
<a href="<?php echo $_category->getURL() ?>" 
title="<?php echo $this->htmlEscape($_category->getName()) ?>">
<img class="pic_size_subcat" src="<?php echo $_category->getImageUrl() ?>" width="100" alt="
<?php echo $this->htmlEscape($_category->getName()) ?>" /></a>
<h2><a href="<?php echo $_category->getURL() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>"><?php echo $this->htmlEscape($_category->getName()) ?></a></h2>
if($categorycount == 3){
$categorycount = 0;
echo "</ul>\n\n<ul class=\"products-grid two_columns_5\">";

but when i inspect the element in my web browser it shows this -

<img class="pic_size_subcat" src="" width="100" alt="

so all i can tell is that it is reading in the code correctly but it isnt getting the img src. Does anybody know why? it worked before i cloned the website

1 Answer 1


In my experience, this is nearly always a file permission issue. Make sure that the webserver has write permissions on the media and var directory. If you set the permissions, make sure you set them recursively.

  • Both permissions are set to 0777 and still not working ?
    – Adam Allen
    Jun 2, 2014 at 10:49
  • The problem was i had edited a core file and then when i upgraded it reset so i made a sub file and used that instead thank you for your suggestion though
    – Adam Allen
    Jun 2, 2014 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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