We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Error: Resource interpreted as Image but transferred with MIME type text/html

Hi, I am a new Phalcon learner. I have a problem when I try to output an image 'image.jpg' in a volt file.

<?php
 echo Phalcon\Tag::imageInput(array("src" => "images/1.jpg"));

But I get an error message in console :

Resource interpreted as Image but transferred with MIME type text/html: "https://localhost/TestPhalcon/images/1.jpg".

Could someone tell my why and how to solve it ? Thanks.



98.9k
Accepted
answer

Have you checked that /your-project/public/images/1.jpg does exist?

Thank for that. I should put my image file in public folder.