You don't need to use base64 to store binary data in a BLOB data type.
Encoding in base64 transforms three bytes of binary data into four bytes of base-64 encoded characters, so it can use only printable ASCII symbols. By doing this, it increases the total size of your data by 33%.
BLOBs can store full 8-bit bytes, and they don't care about bytes that are unprintable. So you can just store the bytes as-is.
That is, once you load the content of your image file into your variable binary_file_data, then just store that directly into the BLOB column using the INSERT SQL statement. Don't encode it.
Re your comments:
The way http works is that each image is a separate http request, so you need to make another PHP script to fetch the BLOB from the database and echo it:
<?php
header('Content-Type: image/png');
// query BLOB data from database
// echo BLOB data
Then in your main PHP script that outputs HTML, you reference the one that reads the image from the database:
<img src="/myimage.php">
As long as the PHP script sets the content-type, it works just as well as reading the image file from disk.