Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vaidas 22 posts 65 karma points
    Jun 28, 2016 @ 07:51
    Vaidas
    0

    Tiff images preview in the backoffice

    Hey, it seems that tiff images are not previewed correctly in the backoffice. When looking at the rendered code I can see that images are displayed as follows:tiffs are not rendered correctly

    <img class="umb-media-grid__item-image ng-scope" width="145.08489722966937" height="200" ng-if="item.thumbnail" ng-src="/media/1166/idealbar_-junckers__mg_4502.tif?width=500&amp;mode=max&amp;animationprocessmode=first" alt="idealbar_ junckers__MG_4502.tif" draggable="false" src="/media/1166/idealbar_-junckers__mg_4502.tif?width=500&amp;mode=max&amp;animationprocessmode=first">
    

    It does not seem to set the format for non-web-friendly images to jpg or sth like that. Is there something that can be done?

    Umbraco version 7.4.3 assembly: 1.0.5948.18141

  • Jamie Pollock 174 posts 853 karma points c-trib
    Jun 28, 2016 @ 08:42
    Jamie Pollock
    1

    Hey Vaidas,
    Hae you tried adding the mime type to web.config? I doubt IIS would know how to handle it.

      <system.webServer>
        <staticContent>
        ...
          <remove fileExtension=".tif" />
          <mimeMap fileExtension=".tif" mimeType="image/tiff" />
        ...
        </staticContent>
      <system.webServer>
    

    This might not solve it though as the browser may not be able to process a TIFF file as an image.

    Thanks,
    Jamie

  • Vaidas 22 posts 65 karma points
    Jun 28, 2016 @ 09:39
    Vaidas
    0

    Hey Jamie,

    Thanks for the reply. I have the mime type specified since the images are used in the frontend.

    I am rendering tiff's using format option

     var format = Model.Content.GetPropertyValue<string>("umbracoExtension") != "png" ? "&format=jpg" : "";
    ...
    @Model.Content.GetCropUrl(width:Model.DefaultWidth, height:Model.DefaultHeight, furtherOptions:format)
    

    So it's only the backoffice that has the issue.

  • Vaidas 22 posts 65 karma points
    Jun 30, 2016 @ 14:50
    Vaidas
    1

    I've created a bug report regarding this issue here: http://issues.umbraco.org/issue/U4-8673

  • Jamie Pollock 174 posts 853 karma points c-trib
    Jun 30, 2016 @ 14:52
    Jamie Pollock
    0

    Great stuff, this feels like the best way to go.

Please Sign in or register to post replies

Write your reply to:

Draft