简体   繁体   中英

Non resized images have content length 0 and content type missing

I have a site that is using the ImageResizer. But not all images use the resizer, we have some images which are not resized. And these seem to be having a content-length of 0 and also the content type is missing in the response headers. We are using AzureReader2 along with DiskCache plugin. Is there any setting or a tweak I am missing. This is a super critical task for me, any feedback is greatly appreciated.

For example:

Does not work:

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

This works fine:

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

Below is what I have in my 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>

EPI server overrides the handling of static files in a way that sometimes doesn't work well.

You may try <add name="AzureReader2" vpp="true" cacheUnmodifiedFiles="true" prefix="~/azure" connectionString="EPiServerAzureBlobs"/>

Sometimes this forces the request to be handled properly.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM