S
S
Semyon Beloglazov2017-08-02 17:39:04
MySQL
Semyon Beloglazov, 2017-08-02 17:39:04

How to store base64 images in MySql?

There is a store on Laravel. I want to store the uploaded product images in base64.
What are the pros and cons?
And how to implement? (what type to store base64 in mysql)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RidgeA, 2017-08-02
@Batlab

- size
+ a certain degree of protection and backup (if, of course, everything is configured correctly)
If you really feel like storing pictures in a database, then it's better to use a BLOB field.
But we need to think carefully why not store pictures on the file system.

R
Roman Mirilaczvili, 2017-08-02
@2ord

In one project, we decided to choose a storage method in the BLOB column in the MySQL DBMS ...
Cons:
Etc.
Pros:
no need to build a repository

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question