imgix-wordpress/images-via-imgix
Composer 安装命令:
composer require imgix-wordpress/images-via-imgix
包简介
imgix WordPress plugin
README 文档
README
A community powered WordPress plugin to automatically load all your existing (and future) WordPress images via the imgix service for smaller, faster, and better looking images.
Features
- Your images behind a CDN.
- Automatically smaller and faster images with the Auto Format option.
- Automatically better looking images with the Auto Enhance option.
- Use arbitrary imgix API params when editing
<img>tags in "Text mode" and they will pass through. - No lock in! Disable the plugin and your images will be served as they were before installation.
Getting Started
-
If you don't already have an imgix account then sign up at imgix.com.
-
Create a Web Folder imgix source with the
Base URLset to your WordPress root URL (without thewp-contentpart). For example, if your WordPress instance is at http://example.com and an example image ishttp://example.com/wp-content/uploads/2017/01/image.jpgthen your source'sBase URLwould be justhttp://example.com/. -
Download the imgix WordPress plugin
imgix_plugin.zipand install on your WordPress instance. In the WordPress admin, click "Plugins" on the right and then "Add New". This will take you to a page to upload theimgix_plugin.zipfile. Alternatively, you can extract the contents ofimgix_plugin.zipinto thewp-content/pluginsdirectory of your WordPress instance. -
Return to the "Plugins" page and ensure the "imgix plugin" is activated. Once activated, click the "settings" link and populate the "imgix Host" field (e.g.,
http://yourcompany.imgix.net). This is the full host of the imgix source you created in step #1. Optionally, you can also turn on Auto Format or Auto Enhance. Finally, click "Save Options" when you're done. -
Go to a post on your WordPress blog and ensure your images are now serving through imgix.
History
Originally this plugin was hosted as part of the official imgix organisation. It was depreciated as they focused their efforts on the PHP library.
This plugin is maintained and managed by the community. Imgix have kindly permitted the use of their name here but it should be noted that there is no official support available for this plugin. If you've got any problems submit an issue on this repo.
Testing
This plugin uses phpunit to run its tests. You will need to set up a local test database to run these tests. You can do that using the bootstrap script:
$ bin/install-wp-tests.sh imgix_wordpress_tests <YOUR MYSQL USERNAME> <YOUR MYSQL PASSWORD>
Then running the tests is as simple as:
$ phpunit
Testing with Docker
This plugin uses phpunit to run its tests. You can use Docker if you don't want to set up the test database locally.
Start the database:
$ docker-compose up -d mysql
Then running the tests is as simple as:
$ docker-compose up phpunit
imgix-wordpress/images-via-imgix 适用场景与选型建议
imgix-wordpress/images-via-imgix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.64k 次下载、GitHub Stars 达 55, 最近一次更新时间为 2017 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「wordpress-plugin」 「imgix」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 imgix-wordpress/images-via-imgix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 imgix-wordpress/images-via-imgix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 imgix-wordpress/images-via-imgix 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Tools for cropping, uploading to S3, serving through Imgix
Laravel bindings and facade to generate imgix URLs and support for multiple sources.
Generate Imgix URLs.
A Gutenberg like color palette field for ACF.
统计信息
- 总下载量: 5.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 55
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2017-03-30