The code you provided me suits more front-end views. In my case, I am developing a backoffice plugin, hence in my views and angularjs code, I don't have access to UmbracoHelper "Umbraco". Am I right?
For now, all what i did is make use of the embedded ImageProcessor n Umbraco. When the user selects a Media Item from the media picker, I simply generate a thumbnail by appending "?width=100" on the image url itself.
Let me know please if there is a better way of doing the same thing.
Using mediaHelper to return a thumbnail fails
Hi, I am making use of:
The above returns:
How to return a thumbnail instead of a big picture?
Is this the right way to go or I should be returning a certain "Crop Alias" Url from the server to use?
Thanks /Bilal
I have no idea what that mediaHelper is you are using and can't seem to find any documentation on it.
If you have the node that contains the image as an IPublishedContent (which you should for displaying that node)
you can do the following to display the image as a cropped image
if you already have the Media item as an IPublishedContent you can forgo the first 2 commands and run the GetCropUrl directly on the media item.
Thanks for your help Sven.
mediaHelper is a service under "Belle". More you can read here: https://umbraco.github.io/Belle/#/api/umbraco.services.mediaHelper
The code you provided me suits more front-end views. In my case, I am developing a backoffice plugin, hence in my views and angularjs code, I don't have access to UmbracoHelper "Umbraco". Am I right?
For now, all what i did is make use of the embedded ImageProcessor n Umbraco. When the user selects a Media Item from the media picker, I simply generate a thumbnail by appending "?width=100" on the image url itself.
Let me know please if there is a better way of doing the same thing.
/Bilal
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.