Try our conversational search powered by Generative AI!

Baaijte.Optimizely.ImageSharp.Web with EpiCode.SqlBlobProvider?



I have rewritten the EpiCode.SqlBlobProvider to work with CMS 12 and now we want to try and use it with Baaijte.Optimizely.ImageSharp.Web to be able to resize images smoothly.

Everything is now installed but I can't get it to work? Do I maybe have to update the SqlBlobProvider with an IImageProvider?

The URL seems to render correct:

 <img src="@Html.ProcessImage(Model.Image).Width(125)"/>

gives me

<img src="/assets/images/image.jpg?width=125" />

But the image is still not resized, the original image is still the one loaded.

Any thoughts?



Sep 07, 2023 7:15

Any reason you want to use SqlBlobProvider? I'm not exactly familiar with it but I think it is quite an anti pattern to use SQL to store blob. You can, yes, but that does not mean you should 

Sep 07, 2023 8:38

No, the only reason is that all media is stored in the databas today. Your suggestion is to move it all to disk I guess?

But you should be able to use the plugin with SqlBlobProvider?

Sep 07, 2023 9:04

As I said I'm not familiar with it so I might be very wrong, but based on some very quick look on SqlBlobProvider/src/EPiCode.SqlBlobProvider at master · BVNetwork/SqlBlobProvider ( it seems to use DDS to store the blob information (which is not as I original thought to use Sql Blob to store files, it still uses disk to store files). I would advise against that as DDS is quite terrible when you have big enough data in there ( a few hundreds and more)

Sep 07, 2023 9:28

Ok, thanks for the advise. I guess completly move media from the database is the best option, do you agree?

Sep 07, 2023 11:31

The assets are handled as content, and for that (the metadata) it is stored in database. I think that is fine (with a usual caveat that you don't want to put a lot (hundred of thousands) of assets in same folder, as that would overwhelm the GetChildren etc.). Other than that I think the files (blobs) should be stored in disks, not database. 

Sep 07, 2023 11:47
* 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.