November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Dave,
In the past the "URL to image" property had a limitation to filetypes that episerver already defined.
Think that I had problem with tif support.
The "workaround" I get from the support was to use "URL to document" property.
Think you have to contact the support to check which filetypes that are allowed.
Magnus
Thanks for your response magnus. I have tried using the UIHint.Document and that seems to do the job. Means the editor has to be a little more careful but I may be able to do some validation on file type when im rendering it.
Many Thanks
Hey Dave,
As Magnus suggested the best way in EPiServer 7 in to use the URL to document since the system only handles predefined image types.
I will say that in the next version of EPiServer, the media system gets an overhaul and we've made it possible to define your own image types that can be handled by the UI.
Thanks Ben, could you provide any more information as to how I would go about doing that? How does it differ from using UIHint.Document?
Many thanks
Dave
In the next version of EPiServer files are also IContent. So you will add a content type which you can map to specific file extensions.
Thanks for your assistance with this. In the end I just changed from UiHint.Image to UIHint.Document, I have lost a little validation on file types but it works fine.
Many Thanks
Dave
Hi,
I'm adding new media (*.svg) to my page, and all works fine, but it is not visible in Edit Mode; when I copy link to my *.svg from Edit Mode and open it in browser - I see "PreviewContainerPage.aspx" which says that "Preview is not available for this page".
Is it because *.svg preview is not supported?
Thanks
Assuming you are using EPiServer 7.5 or above then you can look at the following blog post Working with Media programmatically
Under the secton "Defining a media type" you can see that Johan creates a content type for images. On this content type is a attribute that specifies the file extensions of supported image files. If you add svg to this list then the UI should then work correctly. For example:
[ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png,svg")]
public class ImageFile : ImageData
{
public virtual string Copyright { get; set; }
}
There may be a few quirks, for example the server is unable to generate a thumbnail.
Hi, the site I am currently working on makes heavy use of SVG's for images, there are lots of icons and illustrations in the site and using SVG's allows us to re-use images all over the place at different sizes without any loss of quality. I dont seem to be able to select one as an image for 'Url' field with a UIHint.Image. The media manager lets me upload one, but I just cannot select it. If I manually edit the path the SVG loads fine. Is there any where that I can set the allowed image types, or is there an alternative way to link to it?
Many Thanks
Dave