Images bring life to your WordPress posts and pages by making them more engaging. However, many beginners struggle with aligning images just the way they like.
通过使图像更具吸引力,图像使您的WordPress帖子和页面栩栩如生。 但是,许多初学者都难以按照自己喜欢的方式对齐图像。
The new WordPress block editor (Gutenberg) solves this problem by making it easier to add and align images in WordPress.
新的WordPress区块编辑器(Gutenberg)通过使其更易于在WordPress中添加和对齐图像来解决此问题。
In this article, we will show you how you can easily add and align images in the WordPress to create beautiful content layouts.
在本文中,我们将向您展示如何轻松地在WordPress中添加和对齐图像以创建漂亮的内容布局。
![Adding and properly aligning images in WordPress Adding and properly aligning images in WordPress](https://i-blog.csdnimg.cn/blog_migrate/eb7fb267c729c2f965226fac7598e401.png)
WordPress编辑器中的图像对齐 (Image Alignment in WordPress Editor)
Previously, WordPress used a text area with editing buttons as its default editor. One particular issue in the old editor was image alignment.
以前,WordPress使用带有编辑按钮的文本区域作为其默认编辑器。 旧编辑器中的一个特殊问题是图像对齐。
Even though there were options to align images left, right, or center, they didn’t always look good. Sometimes images didn’t align, were not the exact size, or just looked odd.
即使有将图像左,右或居中对齐的选项,它们也不总是看起来不错。 有时图像无法对齐,大小不正确或看起来很奇怪。
WordPress 5.0 introduced a new WordPress post editor called the Gutenberg block editor. It fixed several problems with the old editor including the image alignment issues.
WordPress 5.0引入了一个新的WordPress帖子编辑器,称为Gutenberg块编辑器。 它修复了旧编辑器的一些问题,包括图像对齐问题。
Let’s take a look at how you can easily add and align images in the new editor to create beautiful layouts for your posts and pages.
让我们看一下如何在新的编辑器中轻松添加和对齐图像,以为帖子和页面创建漂亮的布局。
在WordPress中添加和对齐图像 (Add and Align Images in WordPress)
The new editor comes with the following blocks that you can use to add images into your WordPress posts and pages.
新的编辑器附带以下块,您可以使用这些块将图像添加到WordPress帖子和页面中。
- Image 图片
- Inline Image 内嵌图片
- Gallery 画廊
- Media & Text 媒体与文字
- Cover 盖
Let’s start with a simple image block first.
让我们首先从一个简单的图像块开始。
Click on the ‘Add new block’ button or type /image in the post editor to insert an image block.
单击“添加新块”按钮或在帖子编辑器中键入/ image来插入图像块。