How do I set default value for the imagepicker

Topic summary

A user asks whether it’s possible to set a default value for the imagepicker type in Shopify theme settings (index.json).

Community Response:

  • Setting a default value directly in the schema is not possible according to Shopify documentation
  • A workaround exists using Liquid templating in the theme code

Suggested Solution:

  • Use conditional logic to check if the image field is blank
  • If blank, display a fallback image from a CDN URL
  • Implementation involves wrapping the image source in an {% if %} statement that tests section.settings.image == blank

This approach allows developers to show a placeholder image when merchants haven’t uploaded a custom image through the theme editor.

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

Hi community,

Hope everyone is well. I was wondering whether it is possible to set a default value for the imagepicker type in index.json

Kind regards,

Musango

1 Like

@musangowope – unfortunately – according to the documentation – that’s not possible.

Mario

1 Like

Hi!
Doing it in schema isn’t possible.
The way you can put the default image src:

2 Likes