Reputation: 1
I have been testing the ImageResizer with S3reader2 to resize images from an AWS S3 bucket for a site implementing web forms; this is snippet of the configuration file.
<resizer>
<diskCache dir="~/Resources/Data/Media/ImageResizerCache/" autoClean="true" subfolders="256" />
<plugins> <add name="MvcRoutingShim" />
<add name="DiskCache" />
<add name="PrettyGifs" />
<add name="S3Reader2" prefix="~/s3" region="us-east-1" buckets="cartoonsmedia,cartoonsuserupalods" />
</plugins>
</resizer>
This is the html rendered after the page has been downloaded to the client browser:
<img id="BodyContentPlaceHolderCtrl_ContentRepeater_UserCoverDivImg_30" src="../../s3/cartoonsmedia/c9e0a1d5-fdfe-4559-a2a5-52737c94efd2.jpg?width=100&height=100&mode=crop&format=jpg&bgcolor=ff000" />
These images are inside a asp:DataList, which is inside an update panel, everything works well until a partial postback takes place, after the partial postback, all images disappear, even though, when I look at the page source the image tag's src attribute still has the same value.
../../s3/cartoonsmedia/c9e0a1d5-fdfe-4559-a2a5-52737c94efd2.jpg?width=100&height=100&mode=crop&format=jpg&bgcolor=ff000
Any help, its greatly appreciated, after a whole day of tinkering around I haven’t been able to figure out what the problems is.
Upvotes: 0
Views: 25
Reputation: 16468
You need to use the Chrome Developer Tools. Open the Network Panel, and look for the original (successful) image requests, followed by the failed requests.
While the relative path isn't changing, it's possible the base or document path is changing during postback. This should confirm or deny that it is a URL issue. Typically, it's safer to use domain-relative paths instead of relative paths when you're writing legacy ASP.NET forms.
Upvotes: 0