Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_Johnson's avatar

Images not working when changing from html to php

Hey, when I change my file type from html to php, the images no longer work. I have no idea why this is happening because the src is correct. Any ideas to why this is happening.

0 likes
4 replies
Sinnbeck's avatar

Look at the dom (press f12 in Chrome) and compare the img tags. You can post them both here if you don't see any difference

Tray2's avatar

Have you set up your web server to handle php files?

jlrdw's avatar

Showing some code would help others help you.

Randy_Johnson's avatar

I'm sorry guys, I have figured it out, the file goes inside the public folder.

Please or to participate in this conversation.