I want to encode/decode my Image with base64:
$imageEncoded = base64_encode($image);
$imageDecoded = imagecreatefromstring(base64_decode($imageEncoded));
But it is not correctly decoded
You don't have to use imagecreatefromstring
in your code. You can encode/decode
with php base64
functions.
$imageEncoded = base64_encode($your_image);
$imageDecoded = base64_decode($imageEncoded);