问题描述
修改
我得到不过它的工作,我不得不添加RemoteReader插件。当我从我的项目中删除AzureReader2插件,它仍然有效,这使得但是感觉是什么AzureReader2插件中受益吗?
I got it to work however I had to add the RemoteReader plugin. When I remove the AzureReader2 plugin from my project it still works which makes sense however what is the AzureReader2 plugin benefiting me?
原题
我所做的一切,已经大纲(包括注释),但似乎无法弄清楚为什么我不能与此插件imageresizer动态调整图像。
I have done everything that has been outline here (including the comments) but can't seem to figure out why I can't resize images on the fly with this plugin for imageresizer.
这是什么元素下我的web.config条目如下:
This is what my web.config entry under the element looks like:
<add name="AzureReader2" prefix="~/img/" connectionString="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[key]" endpoint="http://<account>.blob.core.windows.net/" />
和我建立了我的容器被称为IMG。
and I have set up my container to be called 'img'.
当我去这个网址来测试一下:的https://&LT;账户&GT; .blob.core.windows.net / IMG / image.jpg的宽度= 50
图像显示出来,但只是在其正常大小。我也试着运行这个本地和现场侧AWS,但仍然没有得到调整大小:(
When I go to this URL to test it out: https://<account>.blob.core.windows.net/img/image.jpg?width=50
The image shows up but just in its regular size. I've also tried running this locally and on the live side AWS but still get no resizing :(
推荐答案
库允许提供图片的修改版本(调整大小,裁剪,旋转,与水印等)。 是一个插件,允许获取来自Azure的斑点( HTTPS未修改的图像: //&LT;账户&GT; .blob.core.windows.net
),而不是磁盘。
ImageResizer library allows to serve modified versions of images (resized, cropped, rotated, with watermark etc.). AzureReader2 is a plugin that allows to fetch unmodified images from the Azure Blob (https://<account>.blob.core.windows.net
) as opposed to disk.
所以它应该被用来获取图像的修改版本网址是安装ImageResizer库应用程序的网址,而不是Azure中的Blob网址(例如 https://开头&LT;帐户&GT; .blob。 core.windows.net/img/image.jpg?width=50
)。
So URL which should be used to obtain modified version of an image is your application URL with ImageResizer library installed and not Azure Blob URL (in your example https://<account>.blob.core.windows.net/img/image.jpg?width=50
).
修改
插件可以让你从Azure中的Blob读取图像相同的方式,如果他们被保存在磁盘。如果你的应用是建立在所有图像都来自Azure的斑点来的方式,你可以有两个独立小组:一是管理您的图片(和其他媒体,如CSS)和一个管理您的code 。这种做法AzureReader2插件会非常方便。
AzureReader2 plugin allows you to read images from Azure Blob the same way as if they were saved in a disk. If you application is built in a way that all images are coming from Azure Blob, you can have two independent teams: one managing your images (and other media like CSS) and one managing your code. With that approach AzureReader2 plugin will be very handy.
我希望这将有助于。
这篇关于使用AzureReader2插件ImageResizer为Azure的不调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!