We have literally searched all over Stackoverflow and Google to find this solutions but still don't have the right answer.

We're trying to auto-set the Base, Small and Thumbnail options on the first uploaded image, so when uploading multiple images the first image will always have all three options checked.

If anyone has tried and succeeded with find this answer and advice, Thank you.

Catalog Product

1 Answer 1


If you want to set this type of functionality via code then

$_Product->addImageToMediaGallery($filePath1, array('media_image', 'thumbnail','small_image','image'), false, false);

Pass the argument as array('media_image', 'thumbnail','small_image','image') then this image is set as Base, Small and Thumbnail.

If you upload via back-end then you have to set that thing manually.

  • Thank you for your quick response Keyul Shah, but as you can see we're wanting to do this from within the backend. Do you have any further suggestions and ideas on how we would be able to achieve this ?
    – rawco_de
    Commented Sep 5, 2014 at 9:14
  • No in back-end you have to do it manually
    – Keyul Shah
    Commented Sep 5, 2014 at 9:24
  • No problem, thank you for your time and help keyul
    – rawco_de
    Commented Sep 5, 2014 at 9:42

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.