The best approach is to store the image on your filesystem and then reference its location via MySQL. Storing images in MySQL is not recommended. Why put an extra unnecessary strain on your database? All of the large websites (Facebook etc) store their images on a filesystem.