承接 pstaender/high-quality-low-size-image-for-kirby 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pstaender/high-quality-low-size-image-for-kirby

最新稳定版本:0.0.12

Composer 安装命令:

composer require pstaender/high-quality-low-size-image-for-kirby

包简介

Converts images to low file size high quality images in webp and avif

README 文档

README

Install

$ composer require pstaender/high-quality-low-size-image-for-kirby

Usage

<?= $page->someImage()->toFile()->highQualityLowSize() ?>

Now your image will be a webp or avif instead of jpg/png/etc 🚀

Webp will be the format if gdlib is available, avif if imagemagick is enabled via thumb driver.

It also checks that the browser supports webp and avif via the accept header and returns the original file if not supported.

Optional: Image Tag

To use it also in kirby text (via image tag) set in config.php:

[
    'high_quality_and_low_size_image' => [
        'image_tag' => true,
    ],
]

You can exclude specific image formats from encoding, by default gif, webp and avif are excluded. To set your own rules or to simply force re-encoding every file (by defining an empty array), set the values here:

[
    'high_quality_and_low_size_image' => [
        'excluded_image_formats' => [
            // 'avif', 'webp', …
        ],
    ],
]

License

MIT

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固