Coder Social home page Coder Social logo

kurozumi / resizeimage4 Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 81 KB

テンプレートに専用のTwigフィルターを設定するだけで、かんたんに画像をリサイズすることができます。

License: GNU Lesser General Public License v2.1

PHP 68.40% Twig 29.10% Python 2.50%
ec-cube4 ec-cube-plugin eccube4

resizeimage4's Introduction

画像リサイズプラグイン

カスタマイズ、または他社プラグインとの競合による動作不良つきましてはサポート対象外です。

本プラグインを導入したことによる不具合や被った不利益につきましては一切責任を負いません。 ご理解の程よろしくお願いいたします。

Example

商品一覧ページの画像を250*250pxにリサイズしたい場合。

<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') | imagine_filter('resize', {
    "thumbnail": {"size": [250, 250] }}
) }}">

商品一覧ページの画像をトリミングしてリサイズしたい場合。※デフォルトはトリミングするので省略可

<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') | imagine_filter('resize', {
    "thumbnail": {"size": [250, 250], "mode": "outbound" }}
) }}">

商品一覧ページの画像をトリミングせず、相対的なサイズに変更したい場合

<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') | imagine_filter('resize', {
    "thumbnail": {"size": [250, 250], "mode": "inset" }}
) }}">

独自プラグインでインストールする場合

以下のライブラリをインストールしてください。

composer require liip/imagine-bundle
composer require aws/aws-sdk-php

AWS 3Sを利用

管理画面>画像リサイズ管理>Amazon S3連携設定で必要な情報を設定して有効化ください。

resizeimage4's People

Contributors

kurozumi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

japanweb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.