[wordpress插件] CDN Image ProxyCDN映像代理

wordpress 插件 文章 2020-03-19 23:00 522 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

When developing locally, it’s common to use a database dump from a production site.

在本地进行开发时,通常会使用生产站点中的数据库转储。

With large sites, it’s also common that the production site’s image uploads cannot be easily copied to the local environment, because there are simply too many of them.

在大型网站上,生产站点的图像上传通常很容易被复制到本地环境,这是很常见的。

While local environments like Pilothouse allow you to easily proxy image uploads to your local environment from the

Pilothouse 这样的本地环境使您可以轻松地将图像上传代理从本地

production site, that doesn't work so well if you add or change one of the registered thumbnail sizes in your local copy of the theme, since the new thumbnail size can't be proxied from production as it doesn't exist there.

生产站点,如果您在主题的本地副本中添加或更改注册的缩略图大小之一,则效果不佳,因为新的缩略图大小不能从生产中替代,因为新的缩略图大小在那里不存在。

You’re also not able to regenerate the needed thumbnail sizes locally, because the original image file is not present locally.

您也无法在本地重新生成所需的缩略图尺寸,因为原始图像文件不在本地显示。

CDN Image Proxy solves this problem by using Jetpack Image CDN (

CDN Image代理通过使用 Jetpack Image CDN

formerly Photon) to proxy image uploads from your production site.

以前是Photon)代理从您的生产站点上传的图像。

Jetpack Image CDN will automatically generate and serve any required thumbnail size on-the-fly, but CDN Image Proxy will tell it to look for the original image on your production server, rather than on your local URL.

Jetpack Image CDN会自动即时生成并提供任何所需的缩略图大小,但是 CDN Image Proxy 会告诉它在生产服务器上而不是本地URL上查找原始图像。

The result is that you can add or change registered image sizes locally whenever you want, and Jetpack Image CDN will generate and provide a CDN URL for whatever thumbnail size is required, sourced from the original image file located on the production site.

结果是您可以随时在本地添加或更改注册的图像大小,并且Jetpack Image CDN会生成并提供所需缩略图大小的CDN URL,该URL取自生产站点上的原始图像文件。

安装步骤

    1. Install and activate CDN Image Proxy on your local site
    2. 在本地站点上安装并激活 CDN Image代理

    3. Install and activate Jetpack on your local site
    4. 在本地站点上安装并激活 Jetpack

    5. Go to Settings > Media and save your production site’s URL in the field provided.
    6. 转到设置>媒体,然后在提供的字段中保存生产站点的URL。

    You can also define your production site’s URL as a constant in wp-config.php, like so:

    您还可以在 wp-config.php 中将生产站点的URL定义为常量,如下所示:

    define( 'CDN_IMAGE_PROXY_REMOTE_URL', 'http://example.com' );

      define('CDN_IMAGE_PROXY_REMOTE_URL','http://example.com');

下载地址
https://downloads.wordpress.org/plugin/cdn-image-proxy.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Culture Object文化对象
[wordpress插件] DishSoap洗碗剂
[wordpress插件] Add URL Slugs as Body Classes将网址段添加为正文类
[wordpress插件] Advanced Custom Fields: Typography Field高级自定义字段:版式字段
[wordpress插件] contact info联络资料
随便看看
微信开放平台跟公众平台有什么区别? 3607
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4798
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9047
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7471