I’ve made an image in Photoshop, but it won’t show on my site. Instead, it shows up with the little white box with the ripped paper icon. Do I need to convert the PSD file to some other sort of file?
Here is my HTML snippet:
<!doctype html>
<link rel="stylesheet" href="styles.css">
<img src='file:///C:/Users/Tom/Pictures/logo.psd'>
<div align="center">
<h1>Home</h1>
<a href="home.html"> Home </a>
<a href="myproducts.html"> My Products </a>
<a href="about.html"> About </a>
</div>
6
Answers
PSD is not a valid web image format. You might export your image in one of the following formats:
You should use jpeg, png or gif, depending on what’s more appropriate for your image. Take a look at this other answer for guidance:
https://stackoverflow.com/a/392646/1203176
You can’t use a PSD in your website. Convert it to PNG, JPG, GIF or some other format.
You can do this by clicking file > Save for Web.
In the right corner you can select the new image type.
You must convert it to png for exemple. to do that just open your logo.psd in photoshop and then click file==> save as and choose the png extension.
A PSD file is a file format used by and specific for Adobe Photoshop. Other applications (like your webbrowser) do not know how to read it. You need to convert it to another format.
In Photoshop, with the document open, click File ยป Save As…, and then select as file format the desired format (see image below). Which format to choose, is pretty much explained in another Stack Overflow answer.
It is also recommended that you avoid using
file:///C:/Users/Tom/Pictures/logo.psd
for links; use relative links instead. If you are ever about to put your website online, with many users, the image won’t show up, because the browser of the visitors of your website will look for a file located inC:/Users/Tom/Pictures/logo.psd
on their own computes.Web browsers do not render
.psd
files. This file extension is only properly understood by Adobe Photoshop..psd
in Adobe Photoshop.jpg
or.png
.psd
in your.html
file