Snake Eyes
Snake Eyes

Reputation: 16764

Umbraco get media thumbnail url

Umbraco, when save an image, will create 3 files:

originalfile.jpg
originalfile_big-thumb.jpg
originalfile-thumb.jpg

I used:

Umbraco.TypedMedia(mediaId) or Umbraco.Media(mediaId)

but it gave me the url to original image.

There is a method of UmbracoHelper which takes the url to image thumbnail (big-thumb or thumb) ?

Upvotes: 0

Views: 1034

Answers (1)

Marcin Zajkowski
Marcin Zajkowski

Reputation: 1728

I'm guessing that those thumbnails are obsolete and not used in Umbraco right now. There was a thread how to hack it and use it on Our: https://our.umbraco.org/forum/developers/razor/22898-How-to-get-media-thumbnail#comment-85557.

If you want to have control over the sizes of the images and be able to create your own crops and modifications, check ImageCropper data type: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper.

Upvotes: 3

Related Questions