WordPress allows you to easily attach photos to your posts to make them more interesting and appealing. You can add a single photo inside the text, featured image(s) or you can even create galleries. In this tutorial we will cover single images inside your post but a lot of the info we share here does also apply to the others.
There are two places where you can upload an image file. Either in the media library or directly into your post. The later is of course the more direct way but both will work.
How To Add A Single Photo
The easiest way to add a single image is to go to your post, place the cursor in the spot where you want it and press the “Add Media” button located above the visual editor then either select a photo from your library or upload a new one. You can also just drag & drop the file from your computer into the editor, it will be placed where you had your cursor before.
Now before you click on “Insert into post” you should select the following options according to your preference:
Alignment: Left, Center, Right & None
Link to: None, Media File, Attachment Page & Custom URL
Size: Thumbnail, Medium, Large & Full Size (original size)
You can adjust these options also later by clicking on the photo inside the editor and then click on the pen icon in the small toolbar that pops up. But by doing it right away you can save yourself this additional step.
Below you find the details about each option and what it does.
Placement of the image in relation to the post and the containing text.
Determines what happens when someone clicks on the photo. If you want that the photo to get enlarged you have to select “Media File”. On our sites this will automatically trigger our Lightbox Script, to get this on your own site you will probably need to install a Lightbox plugin and configure it properly. Attachment Page will open it in a separate page. None will disable any link function. With custom URL you can assign any internal or external link.
This determines how large your photo is displayed. The sizes depend on the initial size of the photo and your media settings. WordPress creates for each image file you upload at least two additional sizes (thumbnail & medium). If the image is large enough it creates also a large size version. Full size is the original one you uploaded.
These sizes can be adjusted in “Settings > Media”. Keep in mind that if you already have images in your library and change these values you will need to regenerate them. There are several free plugins available that can help you with that.
Our Top 3 Tips
Edit your photos with your favorite editor before you upload them. Adjust the dimensions and the quality. In most cases a dimension of 1200px x 800px with a 60% quality still looks good enough. Large photos can significantly slow down your site.
Rename your photos before you upload them. Give them a unique title. Example: instead of “DSC007968.jpg” use “Post Title Photo 1.jpg”. This saves you the extra work of having to adjust the title afterwards for the SEO and helps you to find photos easier if you need to replace them.
For regular photos do not use PNG files, they are much larger in file size (Kilobyte) then if you use JPG or JPEG without giving you any benefits. GIF is not really suitable for photos.