Pods: Placeholder image

Created on 9 Sep 2019  Â·  7Comments  Â·  Source: pods-framework/pods

Issue Overview

Expected Behavior





It would be useful to be able to have a "placeholder" image in the field type of Image. That way, instead of having a blank area (no image) a placeholder image would appear.

Current Behavior




Steps to Reproduce (for bugs)



1.
2.
3.
4.

Possible Solution


WordPress Environment


Copy and paste your System Details from **Pods Admin > Settings > Debug Information** in WordPress admin here.

Pods Package Export (helpful!)




Copy and Paste the JSON Export from **Pods Admin, Migrate: Packages, Export** in WordPress admin here

Workaround or Alternate Solution Until Bug is Addressed


Related Issues and/or PRs

Need Votes Enhancement

All 7 comments

Issue-Label Bot is automatically applying the label Type: Enhancement to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@fsask This honestly sounds like something you should handle at the theme level. You're using Pods for your content management. Display strategy, ie, placeholder images is part of your content strategy and that's something you would handle as an output fallback if the image didn't exist.

That's just my viewpoint. I'm open to reasons why this should be handled at a Pods level.

It's really just a question of user input. I have a client who has little technical skill, but they are able to go through a Pods form and fill in the fields. I have set the Pod up so that they must choose an option for certain fields, on others (not required fields) [if] statements just hide the empty fields - no problem. But the images are slightly different, I guess.

By having an automatically applied placeholder image, the space the image takes up is not an issue on the page display, as as long as there is an image of any kind (they're all set to the same size) the formatting is preserved. If the field containds nothing, it becomes more difficult to preserve page formatitng, especially over different viewing platform/device screen sizes.

Have you tried entering the attachment ID into the default value field for the field?

Meaning the attachment ID of your placeholder image. That would give you the same result, I think.

Also if there's no image, you could do an if block for the image. If none was uploaded, you could output your default placeholder image in the else portion of the if block.

Added need votes for the UI part (default field value as an image picker).

Was this page helpful?
0 / 5 - 0 ratings