It is not a good programing practice to save images in database. The simplest methodology is to save images with a reference from mysql.
For example you have a table of images with unique ID, you can use this ID along with some hash (for protection) and store in a folder, at the time of retrieval call the id with hash.