Hi There,
I am curious to know how we can leverage the Image core component model for a single resource with two images.
Use case :
1. We have a component say hero with a requirement to have a background and a featured image.
2. We are thinking to use both images the same as the core image component and should leverage all the core image component capabilities.
Let me know your suggestions or references on the same.
Thanks,
Ravi Joshi
Solved! Go to Solution.
Views
Replies
Total Likes
hi @ravi_joshi ,
May I know what all features/capabilities you want author to perform on images. If only path can suffice at single place, then you can have one field where author can only choose asset as highlighted in the screenshot.
Hope this helps.
Thanks,
Nikita Garg
hi @ravi_joshi ,
If you are planning to utilize the OOTB image component for two fields, then both will save with property name i.e. fileReference so both background and feature will use same image.
Have you tried using that?
Thanks,
Nikita Garg
Hi @Nikita___Garg ,
If we use the same property name for two fields then one will override the other and we will always have a single image authored for both places. Is there any way we can overcome this problem?
Thanks,
Ravi Joshi
hi @ravi_joshi ,
May I know what all features/capabilities you want author to perform on images. If only path can suffice at single place, then you can have one field where author can only choose asset as highlighted in the screenshot.
Hope this helps.
Thanks,
Nikita Garg
Hi,
Probably, you can check Teaser component implementation
Views
Likes
Replies