Linux 软件免费装
Banner图

Media Focus Point

开发者 wpcompany
更新时间 2025年1月3日 20:18
PHP版本: 7.4 及以上
WordPress版本: 6.7.1
版权: GPLv3 or later
版权网址: 版权信息

标签

image background focus center focal

下载

1.2.2 1.0 1.1 1.2 1.2.1

详情介绍:

This plugin makes managing background images effortless by allowing you to set a focus point that stays consistent. Regardless of how the image is resized or the background changes, the focus point ensures that the most important part of the image remains visible and centered. Ideal for responsive designs and dynamic backgrounds, this tool ensures your media always looks polished and professional on any screen size or resolution. 🚀 See the plugin in action on WP Company

安装:

To display an image in your custom template with the focus point applied, you can use the following code snippet: Most WordPress themes already use this standard WordPress method to render featured images. For featured images (post thumbnails): For images from Advanced Custom Fields (ACF): To ensure the image fills its element while maintaining the focus point, use the object-fit property in your CSS. For example: img { height: 300px; width: 100%; object-fit: cover; } 💡 The plugin automatically adds an inline style attribute to the image element, such as: style="object-position: 50% 38%;"

屏幕截图:

  • This screenshot showcases how to set the focus point on an image.
  • This screenshot illustrates how the image resizes while ensuring the focus point remains visible.

升级注意事项:

1.0 This is the first stable version of the plugin. Upgrade to enjoy the full functionality of setting and maintaining focus points for media backgrounds.

常见问题:

How do I set a focus point?

When you upload an image, the default focus point is centered. To change this, follow these steps:

  1. Upload your image: After uploading, you’ll see the standard focus point set to the center of the media.
  2. Edit the focus point: Below the alt text and description fields, you’ll find an option labeled Focus Point. Click on this the 'Change' button.
  3. Select the focus area: A preview of your image will appear. Simply click on the part of the image you want to focus on. The plugin will visually mark the selected focus area.
  4. Save your selection: After selecting the focus point, click Save. The plugin will record your choice.
  5. Adjust percentage: Once saved, you will see two percentage fields: one for the horizontal and one for the vertical focus point. These percentages represent the exact position of your selected focus area relative to the image’s dimensions.
  6. No additional save required: Once the percentages are set, the focus point is automatically applied, and there’s no need to save the image itself again.
The focus point will now remain centered on the selected area as the image resizes, ensuring the most important parts are always visible, no matter the screen size or layout changes.

Is this plugin compatible with all themes?

Yes, the plugin is designed to be compatible with most WordPress themes that use image backgrounds. If you encounter issues, please reach out to our support team.

更新日志:

1.2.1 1.2 1.1 1.0