0

how i can add image place holder on front-end page when image is not uploaded or not found in both cases.

actually, i am working on custom module, in which i have to fill the form front-end in which i have the option of image uploading a photo. i want that if someone does not upload the image, then there is a default image in it.enter image description here

3
  • Have you got solution? I want to do same as your requirement. May 29, 2019 at 11:47
  • yes i have the solution for this.
    – sudo55
    May 29, 2019 at 17:44
  • Can you please share that solution or piece of code? May 30, 2019 at 4:44

1 Answer 1

0

I'm not sure if this is what you are looking for but simply login to the backend.

Select: Stores, Configuration, Catalog, then scroll down to Product Image PlaceHolders (see image below)

Product Image PlaceHolders

Then simply upload the various custom placeholder images from your computer.

3
  • i am working on custom module. So these configuration won't work.
    – sudo55
    Jun 9, 2018 at 10:14
  • Perhaps you can provide more details as to what the situation is so that someone can point you in the right direction.
    – wizdom
    Jun 9, 2018 at 14:59
  • actually i have to fill the form front-end in which i have the option of image uploading a photo. i want that if someone does not upload the image, then there is a default image in it.
    – sudo55
    Jun 10, 2018 at 15:13

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.