| 开发者 | binsaifullah |
|---|---|
| 更新时间 | 2026年11月9日 16:28 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
srcset and sizes for images from the Media Library./image compare in the editor./wp-content/plugins/image-compare-block directory, or install the plugin through the WordPress plugins screen directly./image compare.Install and activate the plugin, open a post or page in the block editor, add the "Image Compare" block and choose your before and after images. That's it.
Yes. It works with block themes and classic themes, and in posts, pages, custom post types, widgets and Site Editor templates wherever the block editor is available.
No. It is a native Gutenberg block. No page builder is required.
Yes. The slider scales with its container, serves responsive images from the Media Library, and supports swiping on touch devices while vertical page scrolling still works.
Yes. Turn on vertical mode in the block settings to compare images from top to bottom.
Yes. Enable labels, change their text, and style their position, colors and font size. Labels can be always visible or shown only on hover.
No. The block has no jQuery or external dependencies, and its small script and styles load only on pages that contain the block.
Yes. The slider handle can be focused with the keyboard and moved with the arrow keys, Page Up/Down, Home and End. It is exposed to assistive technology as a slider with its current value, and you can set alt text for both images.
Yes. Add as many Image Compare blocks as you like.
For the best result, use two images with the same dimensions and framing. You can also set an aspect ratio on the block to crop both images evenly.
Yes. Blocks created with older versions are upgraded automatically. On the front end they use the new slider straight away, and the next time you open the post in the editor they are migrated with no validation errors.
No, it is built with native block editor components only.
srcset/sizes).wp-editor dependency.