Page 1 of 1
Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 1:31 am
by marcuslane
Hello first off I am really new to opencart, I just installed recently and it's great! I was wondering if its possible to use a default image for products without an image. I have been searching on google, but I have been unsuccessful. Thanks

Re: Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 1:43 am
by Moggin
There's one in the default Opencart download ...image/cache/no_image
It appears automatically on products with no image. Very easy.
You can place a copy in your image folder too: comes in handy if you need to remove an image, as you can just swop any redundant pictures for the no-image.jpg.
Re: Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 2:01 am
by marcuslane
Thanks for the quick reply! For some reason the default image is not showing up on the front-end I made sure the images file was 777 and the sub folders. Do I have to enable something?
Re: Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 3:07 am
by Moggin
Moggin wrote:It appears automatically on products with no image. Very easy.
hmm, sorry, let 's correct that. It appeared automatically on older versions of OC, but this feature seems to be missing in 1.5x. No idea why.
However, you can still upload the no-image.jpg to your main image folder, and click on it to add it to your product page.
Re: Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 5:52 am
by Qphoria
To add it back to 1.5.x
1. EDIT: admin/controller/catalog/product.php
2. FIND:
3. REPLACE WITH:
Code: Select all
$this->data['image'] = 'no_image.jpg';
The no_image.jpg file is in the root "image" folder as opposed to "image/data" where all uploaded images go.
Replace that with your own default image and you should be set for future inserts
Re: Is it possible to add a default product image?
Posted: Thu Feb 16, 2012 8:44 am
by Moggin
Thank you. : )
Re: Is it possible to add a default product image?
Posted: Tue Nov 06, 2012 3:19 am
by preto
Is it supposed to work in whole site, like product, category, search areas?
I tried this but doen'st work. There are some extensions that do this by editing each respective controller
Re: Is it possible to add a default product image?
Posted: Fri Feb 22, 2013 5:28 pm
by Joxe
Qphoria wrote:To add it back to 1.5.x
1. EDIT: admin/controller/catalog/product.php
2. FIND:
3. REPLACE WITH:
Code: Select all
$this->data['image'] = 'no_image.jpg';
The no_image.jpg file is in the root "image" folder as opposed to "image/data" where all uploaded images go.
Replace that with your own default image and you should be set for future inserts
Hi Q,
It didn't work for me. I'm running v.1.4.9.6.
By mistake I deleted a image folder and now all the products that had an image in this folder have no image at all :/
Re: Is it possible to add a default product image?
Posted: Thu Jul 04, 2013 8:29 am
by beattie
Many thanks Qphoria. I found your solution very useful and easy to implement. I created a VQmod for OC v.1.5.5.1. If anyone wants to use it, you can download it free here:
http://www.opencart.com/index.php?route ... n_id=12529
Re: Is it possible to add a default product image?
Posted: Sun Jul 21, 2013 12:47 pm
by kelemvor
Hmm,
I can see my "no_image" image when I view the product list in the admin tool, but the image doesn't show up when I view the product from the front end. Any idea what would cause that? 1.5.5.1.
Re: Is it possible to add a default product image?
Posted: Sun Jul 21, 2013 4:10 pm
by justcurious
Yes, you will need to edit catalog/controller/product/product.php in the same way that Qphoria outlined earlier in this thread.
Same goes for category, featured, latest, special etc. modules. Find the appropriate controller in the catalog/controller folder and make the edit.