【问题标题】:Non resized images have content length 0 and content type missing未调整大小的图像的内容长度为 0 并且缺少内容类型
【发布时间】:2019-03-01 04:28:26
【问题描述】:

我有一个使用 ImageResizer 的网站。但并非所有图像都使用调整大小,我们有一些未调整大小的图像。这些似乎内容长度为 0,并且响应标头中缺少内容类型。我们使用 AzureReader2 和 DiskCache 插件。有没有我遗漏的设置或调整。这对我来说是一项非常关键的任务,非常感谢任何反馈。

例如:

不起作用:

https://www.example.com/globalassets/home-page/23491_2_2.jpg 

这很好用:

https://www.example.com/globalassets/home-page/23491_2_2.jpg?height=1000&width=1000 

以下是我的 web.config 中的内容

<resizer>
<Clientcache minutes="720" />
<plugins>
<add name="AzureReader2" prefix="~/azure" connectionString="EPiServerAzureBlobs"/>
<add name="EPiServerBlobReaderPlugin" />
<add name="DiskCache" />
</plugins>
<licenses>
<license>

</license>
</licenses>
</resizer>

【问题讨论】:

    标签: image-resizing imageresizer imageresizer-diskcache


    【解决方案1】:

    EPI 服务器以有时无法正常工作的方式覆盖静态文件的处理。

    你可以试试&lt;add name="AzureReader2" vpp="true" cacheUnmodifiedFiles="true" prefix="~/azure" connectionString="EPiServerAzureBlobs"/&gt;

    有时这会强制正确处理请求。

    https://imageresizing.net/docs/v4/plugins/azurereader2

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-18
      • 2012-07-28
      • 1970-01-01
      • 2010-11-02
      • 1970-01-01
      • 2018-07-12
      • 1970-01-01
      • 2013-08-27
      相关资源
      最近更新 更多