Well, saving an image in an SQL database is complicated because its table structure is rigid, and when compressing, the size varies depending on the complexity of the image. If you use an SQL database, the best solution is to store the image separately (or maybe in some cloud storage service) and only put the address of the image in an SQL table field.
Another alternative is to use a database noSQL, such as mongoDB, in which its structure is flexible, i.e., the size of the field is defined by delimiters, not by allocation. But, it is more complicated to make the relationship between the collections (corresponds to the tables in SQL), since this is not relational.
Without understanding your environment and use case is very complicated. In the case of SQL Server read on FILESTREAM
– gmsantos