官术网_书友最值得收藏!

Adding an image to a post

Earlier in this chapter, we learned how to add a simple image to a blog post. Let's now expand on that a bit more.

There are two main methods of adding an image to a blog post (of which we already know the first one):

  • Either click on the + button in the top bar of the block-based editor,
  • Or click on the image icon that's on the right-hand side of the last empty content block on the canvas, as seen in the following screenshot:

At this point, all you need to do in order to add an image to a post is either select it from the Media Library, Upload from your computer, or insert from URL. There are corresponding buttons for each of these methods. Additionally, you can drag and drop an image straight from your desktop.

Once your image finishes uploading, you'll see it added onto the post's canvas. At this stage, you can customize it some more by taking advantage of the options available in the image's pop-up menu, as seen in the following screenshot:

Starting from the left, we have the following:

  • Change block type. This button lets you transform your image block to a gallery block, cover block, file block, or media and text block. Essentially, this feature is meant to show you other similar block types that might be more suited for the type of content you want to add. I encourage you to experiment with those to see what's possible.
  • The next section of five icons is for tuning the image's alignment. The options available are align left, center, right, wide, and full width. While left, right, and center are pretty self-explanatory, the appearance of wide and full width depends on the theme you're currently using. Go ahead and experiment with those options to see what the effect is.
  • The pencil icon allows for more in-depth editing of your image. Upon clicking it, you'll see the following screen:

The more important fields available here are Title, Alt Text, and Caption. 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. Caption is a short description that you want to have displayed beneath the image itself.

  • The last icon—the three vertical dots—is an icon that appears with all other content blocks as well, and it's not unique to the image block. It gives you additional options for what you can do with the block:

Additionally, if you want to, you can also write the caption for your image beneath the image itself, via a standard input box:

Remember that in order to save all the changes, you must save the post itself, either by clicking on the main Publish... button (but this will mean the changes get saved and go live too) or the Save Draft link that's next to it.

主站蜘蛛池模板: 康保县| 嘉峪关市| 曲阜市| 铁岭市| 宁武县| 嵩明县| 普兰县| 哈巴河县| 兴文县| 随州市| 漳州市| 古浪县| 南木林县| 乾安县| 兴和县| 莆田市| 元江| 洛宁县| 简阳市| 九龙城区| 江都市| 汶川县| 沿河| 赣州市| 红安县| 高雄市| 乌兰察布市| 乌拉特前旗| 南阳市| 博野县| 万全县| 忻州市| 财经| 禹城市| 尤溪县| 永吉县| 务川| 三门峡市| 大新县| 兴宁市| 宜宾县|