Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Try;
<img src="/wp-content/themes/<?php echo bloginfo('get_template') . '/img/sample/family.jpg'; ?>" alt="smiling girl" class="thumb"/>
Hmmm, it also doesnt work.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What URL does it generate?
If you mean this, when I look at the source code.
<img src="/wp-content/themes/ZPM pravno svetovanje/img/sample/family.jpg" alt="smiling girl" class="thumb"/>
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Try removing the spaces in your theme’s name.
wow, actually.. I think I know what is wrong now… The ‘ZPM pravno svetovanje’ is not the name of my folder (theme) but it is ZPMpravna…
Nope it still doesnt work.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
May you provide a link to the webpage with the issue?
It is strange that it somehow kinda loads the first image (the logo), but not completeley. For the logo I used
<img src=”<?php echo bloginfo(‘get_template’) . ‘/img/logo.png’; ?>” alt=”zveza prijateljev mladine pravno svetovanje logotip” />
Here is the screenshot
http://shrani.si/f/3k/In/4FLpNLYv/logo.png
The website is offline, in fact its on my localhost xampp
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Try viewing the image itself in the browser. Can you view it? If so, check the differences in the URL to the <img>
tag.
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
When I tried opening the image in a new window. Do you think it is a server error?
… ofcourse if i try to view the image itself just by opening it with browser program it worked.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
When I tried opening the image in a new window. Do you think it is a server error?
Yes, the page you’re working on right now with the <img>
tag is on the server. It is referring to your problem that the image cannot be found.
ofcourse if i try to view the image itself just by opening it with browser program it worked.
Any difference in the URL between that and the one generated in the <img>
tag?
the URL of the picture located on directory and opened with browser:
file:///C:/xampp/htdocs/wordpress/wp-content/themes/ZPMpravna/img/logo.png
the URL of the picture on the website:
http://localhost/wordpress/ZPMpravna/img/logo.png
hmmm, no wp-content and themes on the website image url…
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Try using this URL instead;
<img src="img/sample/family.jpg" alt="smiling girl" class="thumb"/>