imazen/resizer

SqlReader removed from V5

edavis1993 opened this issue · 1 comments

We're currently on V4 looking to upgrade but we use ImageResizer to pull all our images from our database using the SqlReader plugin. In the change log it says this plugin has been removed. Are we just stuck on V4 now or is there a workaround?

SqlReader became unwieldy and untestable due to supporting such a wide variety of situations. Not many people use it anymore, either. That said, we tried to maintain backwards compatibility with existing blob providers, so you should be able to copy/paste the V4 class file into your project and rename it: https://github.com/imazen/resizer/blob/support/v4/Plugins/SqlReader/SqlReader.cs

If you want, you could trim it down to what you actually use, or reimplement it.

Inheriting from ImageResizer.Storage.BlobProviderBase and implementing Task<Stream> OpenAsync(string virtualPath, NameValueCollection queryString) is the typical way.