ImageResizer not working in DXC

Vote:
 

Hi, has anyone faced the issue of the ImageResizer not working on DXC? If so could you please suggest how to get this going. I am using the ImageResizer.Plugins.EPiServerBlobReader plugin. The URL is getting rendered fine, and I see the ImageResizer width and height paremeters in the query string as well. But the image is not getting re-sized.

Below is a sample of the URL:

http://test.com/globalassets/article-images/image.jpg?w=100&h=100

Below are the steps of how I am trying to do this:

Installed ImageResizer.Plugins.EPiServerBlobReader nuget package (6.0.3) as we are on EpiServer CMS 10
This added a httpmodule node into the Web.config file


      
      

I then added the below code into the cshtml file to re-size

@using ImageResizer.Plugins.EPiServer

This is working on my local machine which is not a DXC environment, but we are using DXC for the production version and that doesnt seem to work.

#191514
Edited, Apr 24, 2018 22:50
Vote:
 

I think you need to give us more information before we can help. What is not working, no URLs are rendered or URL rendered but no image is displayed? Do the images give you 404 or 500 response code? Do you have any errors or logs?

#191527
Apr 25, 2018 8:46
Vote:
 

@Johan Petersson: Thank you for the reply, I have mentioned all the details with regards to my issue. I hope this is sufficient to help you understand the problem.

#191645
Apr 25, 2018 16:33
Vote:
 

Uploaded images in Episerver that aren't using ImageResizer, are they working as expected? If you place an image inside an XhtmlString property, e.g. MainBody, are they working? Trying to figure out if ImageResizer is the problem or images in general in DXC-S.

#191646
Apr 25, 2018 16:39
Vote:
 

@Johan Petersson: The images seem to be fine as we have them in the MainBody and they are rendered properly. It is only the re-sizing that is not working. I basically took one of the Image resizing URLs and opened it in a new tab, ideally it would re-size the image based on the height and width. But that doesnt seem to happen in the DXC environment.

#191647
Apr 25, 2018 16:45
Vote:
 

I'm not familiar with ImageResizer.Plugins.EPiServerBlobReader. But I guess this add-on needs some sort of configuration, e.g. where it should cache the resized images? Or are you using the same blob storage account locally when it's working?

#191648
Apr 25, 2018 17:07
Vote:
 

@John Petersson: Thank you for guiding me in the right direction, it was bascially a web.config tweak :)

#191650
Apr 25, 2018 17:57
Vote:
 

Hi Siddharth,

which web.config tweak was needed for this to work in DXC?

#197352
Oct 01, 2018 11:07
Vote:
 

@Vishal, basically I did not have all the configurations set right. Below are the configs you might want to confirm:

Make sure the below config is present under <configSections> node:

<section name="resizer" type="ImageResizer.ResizerSection" requirePermission="false"/>

Make sure the below config is present under <system.web> node:

<httpModules>
<add name="ImageResizingModule" type="ImageResizer.InterceptModule" />
</httpModules>

Added the below mentioned snippet under <configuration> node:

<resizer>
<clientcache minutes="720" /> [This was something we added to cache the images for 12 Hrs , this is not mandatory]
<plugins>
<add name="EPiServerBlobReaderPlugin" />
</plugins>
</resizer>

Hope this helps.

#197358
Edited, Oct 01, 2018 15:38
Vote:
 

Check out my colleague Vincent Baaij's work around this area too. I'd say its defintiely worth a look https://world.episerver.com/blogs/vincent-baaij/dates/2018/7/imageprocessor-web-episerver-new-versions/

#197609
Oct 09, 2018 7:40
Vote:
 

HI Marcus,

yes i have used that, but there is an issue with that package incombination with DXC and (used) CDN making the images perform bad. Vincent also looked into it but couldnt find the problem.

So that package works good if you are not using DXC with CDN. We couldnt wait much longer on a solution, so we switched now to ImageResizer which works as expected. 

#197611
Oct 09, 2018 8:06
Vote:
 

Hi Vishal,

I did make some progress on this. The latest version (4.2) works as expected on an Azure environment with a Cloudflare CDN! As you can see from the image below, it gets deliverd from the Cloudflare cache. It does take a short period of time for the cf-cahce-status to chage from MISS to HIT (like 30 seconds). I worked with other Episerver people to find out what the default Cloudflare settings are with regards to querystring parameters and made sure that it works with those settings on my test setup. I don't have access to an actual DXC-S test environment, but it should work there as well.

#198059
Oct 19, 2018 12:51
Vote:
 

Thats great news Vincent,

i want to try this again for you on our Integration environment to see the effects. Only i'm going on holiday next week, so after that i can try to see how it performs.. 

Thanks again for helping out and i'm sure that this package will be a great free option for many of us out there. 

#198060
Oct 19, 2018 13:00
Vote:
 

Thanks Vishal. No rush. Lookig forward to the test results!

#198062
Oct 19, 2018 13:04
Vote:
 

@Vincent, what was the issue?

#198070
Oct 19, 2018 14:39
Vote:
 

@valdis there were some issues in the code with the url's and the way that cached images were returned  in the end I didn't change that much but it was a good exercise in understanding somebody else's code sealed

#198077
Oct 19, 2018 18:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.