Try our conversational search powered by Generative AI!

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

Vote:
 

Hi!

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?

Thanks!

/Kristoffer

#308125
Sep 07, 2023 7:15
Vote:
 

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 

#308129
Sep 07, 2023 8:38
Vote:
 

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?

#308131
Sep 07, 2023 9:04
Vote:
 

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 (github.com) 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)

#308132
Sep 07, 2023 9:28
Vote:
 

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

#308134
Sep 07, 2023 11:31
Vote:
 

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. 

#308135
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.