![WordPress Complete(Sixth Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/765/36700765/b_36700765.jpg)
Adding an image to a post
Luckily, WordPress makes adding images to your content very easy. Let's add an image to the post we've just created a minute ago. You can click on Edit underneath your post on the front page of your site to get there quickly. Alternatively, go back to the wp-admin, open Posts from the main sidebar menu, and then click on the post's title.
To add an image to a post, first, you'll need to have that image on your computer or know the exact URL pointing to the image if it's already online. Before you get ready to upload an image, make sure that your image is optimized for the web; for instance, you can use a service like TinyPNG (https://tinypng.com/). Huge files will be uploaded slowly and slow down the process of viewing your site. Just to give you a good example here, I'm using a photo of my own so I don't have to worry about any copyright issues (always make sure to use only the images that you have the right to use, copyright infringement online is a serious problem, to say the least). Once you have a picture on your computer and know where it is, carry out the following steps to add the photo to your blog post:
- Click on the Add Media button, which is right above the content box and below the title box:
![](https://epubservercos.yuewen.com/53BF86/19470404301621206/epubprivate/OEBPS/Images/bd1c7070-1264-43ac-bad8-504451e06405.png?sign=1739491013-eWW6cXaNPBaXxVpmBAfSjnS8O2hpJ19S-0-db7f6f3b14419075fa077502d9494cae)
- The box that appears allows you to do a number of different things regarding the media you want to include in your post. The most user-friendly feature here, however, is the drag-and-drop support. Just grab the image from your desktop, and drop it in the center area of the page, labeled Drop files anywhere to upload:
![](https://epubservercos.yuewen.com/53BF86/19470404301621206/epubprivate/OEBPS/Images/69bf4d94-5a4b-4bdf-b538-7df5d0fae079.png?sign=1739491013-oam9un0cNul4umtnAGVYe1L1aXQ3x4Du-0-eedd9952a6dff64deea6aa425f194e3a)
- Immediately after dropping the image, the uploader bar will show the progress of the operation, and when it's done, you'll be able to do some final fine-tuning:
![](https://epubservercos.yuewen.com/53BF86/19470404301621206/epubprivate/OEBPS/Images/71d6812f-022f-40b9-b4b3-9f1dcafc78ce.png?sign=1739491013-BDNoL4BfSg0qE1VObUQjTwe8INHlrUvJ-0-60f936748313e639c137bac08a0b39de)
- The fields that are important right now are Title, Alt Text, Alignment, Link To, and Size. Title is a description for the image, Alt Text is a phrase that's going to appear instead of the image in case the file goes missing or any other problems present themselves; Alignment will tell the image whether to have text wrap around it and whether it should be right, left, or center; Link To instructs WordPress whether or not to link the image to anything (a common solution is to select None); and Size is the size of the image (you can select from a couple of presets).
- Once you have all of these fields filled out, click on Insert into post. This box will disappear, and your image will show up in the post--right where your cursor was prior to clicking on the Add Media button, on the edit page itself (in the Visual editor, that is; if you're using the Text editor, then the HTML code of the image will be displayed instead).
- Now, click on the Update button, and go look at the front page of your site again. There's your image!