Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When I upload media of type "Image" through the backoffice, it creates file.jpg, file_big-thumb.jpg, and file-thumb.jpg
However, when I create media files programatically, I'm not getting it to generate thumbnails during this process.
From a previous post I tried the suggestion of saving an empty media object, and then subsequently calling SetValue, but that doesn't work either.
private int CreateMedia(Stream file, string fileName)
var parentId = 2685; // image folder
var service = Services.MediaService;
var media = service.CreateMedia(fileName, parentId, "Image");
media.SetValue("umbracoFile", fileName, file);
I know I can use a URL postfix (?width=500&mode=max&animationprocessmode=first) to invoke the ImageProcessor, but wondering why it's not working with MediaService.
Any insights would be appreciated. Thanks!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted