Displaying thumbnail image in live site

Yowaraj Chhetri asked on June 17, 2020 05:34

Hi there,

I have a pagetype field name "image" of type "Media Selection", which selects image from media library application. This image is of original size, and I want it in public site.

However, in some instances(views component) I want to display thumbnail image instead of actual image that I have selected for that pagetype.

Is there a way to get thumbnail image of the image I have selected, to display in public site?

Thank you in advance!

Recent Answers


Dmitry Bastron answered on June 17, 2020 10:24

Hi Yowaraj,

You can add size constraint into ImageUrl URL helper used in MVC. Have a look at this documentation article, it should give you a good idea how to proceed. Please note, that this is only supported for Media Files with Permanent URLs.

1 votesVote for this answer Mark as a Correct answer

Yowaraj Chhetri answered on June 18, 2020 06:21

Hi Dmitry,

Thank you for the response.

I can see there is a separate _thumbnail folder when media library application stores images in file system. I was thinking to use that instead of resizing the original image using size constraint. Or is it the same thing?

Thanks again.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.