[wordpress插件] Responsive Images响应式图像

wordpress 插件 文章 2020-03-21 18:10 476 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

With the request that search engines ask around images, is difficulty to manager the right sizes and have a good crop for each image size that we have on our theme.

由于搜索引擎要求围绕图像进行搜索,因此难以管理正确的尺寸,并且很难为主题上的每种图像尺寸提供良好的裁剪效果。

With that in mind, we create an option to replace just one size of the image, then when the image shows up on mobile or tablet, it will show de crop that you uploaded instead the one that WordPress made.

考虑到这一点,我们创建了一个选项来仅替换图像的一个尺寸,然后当图像显示在手机或平板电脑上时,它将显示您上载的裁剪图像,而不是WordPress制作的图像。

>

>

Performance (Devs)

性能(Dev)

We add filters and actions mainly on backend.

我们主要在后端添加过滤器和操作。

Any updates on that will be here.

有关此的任何更新都将在这里。

Filters on Front end

前端过滤器

* wp_calculate_image_srcset

* wp_calculate_image_srcset

* wp_calculate_image_sizes

* wp_calculate_image_sizes

To turn off the filter, just add a filter (‘CRI_change_sizes_attr’ and ‘CRI_change_srcset_attr’) returning false.

要关闭过滤器,只需添加返回false的过滤器(“ CRI_change_sizes_attr”和“ CRI_change_srcset_attr”)即可。

Recommended Plugins

推荐插件

    • PNG to JPG by KubiQ – Use this first to convert all the PNG’s to JPG’s
    • 由KubiQ将

    • PNG转换为JPG –首先使用该功能将所有PNG转换为JPG

    • Regenerate Thumbnails by Alex Mills – IF you change the images sizes or add new ones, use this to regenerate all

      Alex Mills的

    • 重新生成缩略图 –如果您更改图像大小或添加新图像,请使用此按钮重新生成所有图像

      the images.

    • 图片。

安装步骤

    1. Upload the entire change-responsive-images-rv folder to the /wp-content/plugins/ directory.
    2. 将整个 change-sensitive-images-rv 文件夹上载到 / wp-content / plugins / 目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Go to Settings > Media Description, and set the name and descriptions for all images that WordPress create.
    6. 转到“设置”>“媒体描述”,然后为WordPress创建的所有图像设置名称和描述。

    7. Go to media library click the image that you want to change and click Edit more details.
    8. 转到媒体库,单击要更改的图像,然后单击“编辑更多详细信息”。

    9. Use the function get_attachment_picture.
    10. 使用功能get_attachment_picture。

下载地址
https://downloads.wordpress.org/plugin/change-responsive-images-rv.1.1.3.zip
-EOF-

AI助手支持GPT4.0