If thumbnail image is not found there is a default image displayed, how to hide default image #4109
vishalgoyal2472
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If thumbnail image is not found there is a default image displayed, how to hide default image if no thumbnail image is found
{{#if @root.properties.layoutProperties.showItemThumbnail}} <div class="template--listItem--thumbnailContainer"> <div class="thumbnail--image"> <pnp-filepreview data-preview-url="{{slot item @root.slots.PreviewUrl}}" data-preview-image-url="{{slot item @root.slots.PreviewImageUrl}}" data-theme-variant="{{JSONstringify @root.theme}}"> <pnp-img alt='preview-image' width="120" src="{{slot item @root.slots.PreviewImageUrl}}" loading="lazy" data-error-image="{{@root.utils.defaultImage}}" /> </pnp-filepreview> <div class="thumbnail--hover"> <div> <pnp-icon data-name="DocumentSearch" aria-hidden="true"></pnp-icon> </div> </div> </div> </div> {{/if}}
Beta Was this translation helpful? Give feedback.
All reactions