but the browser doesn’t recognize this as an image (it spits out the binary).
How do I return an image as a response?
I need this for an automatic image resizing. I’ve tried to use tuupola/slim-image-resize, but it is not compatible with v3.0. I am currently trying to upgrade it and I almost got it to work, except I have this annoying problem.
Boa tarde a todos. Estou com um problema na hora de enviar uma imagem do meu banco de dados da minha API para ser consumida, vejam como estou fazendo:
function GetAllCategoriasIMG(){
$pdo = Database::conexao();
$Select = $pdo->prepare(‘SELECT
CD_CATEGO,
NM_CATEGO,
DS_CATEGO,
IMG_CATEGO
FROM categorias’);
$Select->execute();
$data = $Select->fetchAll(PDO::FETCH_ASSOC);