Image Thumbnail

Posted by Community Admin on 03-Aug-2018 14:23

Image Thumbnail

All Replies

Posted by Community Admin on 03-Feb-2011 00:00

Hey,

I'm looking for a help on how to show image with predefined max width. Basically, I have an image and I can show it using following code:

                Image result = App.WorkWith().Image(id).Get();
                return result.MediaUrl;


I followed directions this URL: http://www.sitefinity.com/40/help/developer-manual/modules-built-in-modules-api-media-modules.html

                Image result = App.WorkWith().Image(id).Get();
                return result.MediaUrl + "?size=400";

it doesn't work (width is not 400px). Using thumbnails URL also doesn't help:

                return result.GetThumbnailUrl() + "?size=400";

What am I doing wrong?

Posted by Community Admin on 03-Feb-2011 00:00

Hello Vitaly,

You cannot use the thumbnail to resize the image. Could you check the url that is generated after you execute the code? It should be something like this one

localhost:4000/.../providers1.png

If you query the image directly from the browser with size=400 is there any difference.

Also clear the browser cache before trying these suggestions.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed