Download the PHP package scaleflex/sylius-cloudimage-plugin without Composer
On this page you can find all versions of the php package scaleflex/sylius-cloudimage-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scaleflex/sylius-cloudimage-plugin
More information about scaleflex/sylius-cloudimage-plugin
Files in scaleflex/sylius-cloudimage-plugin
Package sylius-cloudimage-plugin
Short Description Sylius Cloudimage by Scaleflex.
License MIT
Informations about the package sylius-cloudimage-plugin
Installation
Step 1: Download the plugin
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the plugin
Then, enable the plugin by adding it to the list of registered plugins/bundles in config/bundles.php file of your project:
Step 3: Configure the plugin
Update Channel Model
Your Entity Channel has to implement
You can use Trait
Then add to your config
Upgrade database
Update Channel Form
Include in your
Example:
Change the config
Options
Prerender: If enabled, image url will be updated to {token}.cloudimg.io and disable CI Responsive JS.
Use origin URL: If enabled, the module will only add query parameters to the image source URL without prefixing it with {token}.cloudimg.io
.
Ignore Image Size Node: useful for improving compatibility with some themes.
Ignore Image Size Style: useful for improving compatibility with some themes.
Lazy Loading: if enabled, images will be lazy-loaded for better loading times and user experience.*
*lazy loading can have variable results on some websites as for the first rows of images loaded, therefore it is recommended to make use of an integrated new class provided: “lazy-off”. You can specify the "lazy-off" class either in the page builder through the back-office, or in the templates directly (eg. category page and product page).
Remove V7: Removes the "/v7" part in URL format. Activate for token created after October 20th 2021.*
Advanced Configuration [Optional] This setting is for advanced users only and allows to inject a custom JS function into the Magento templates in order to support some specific Magento templates. Feel free to contact us in order to get the custom JS function to inject to address issues with your specific template.
Custom js function: The js function to customize Cloudimage library.
Image Quality: Customizes the image quality, therefore compression -size- applied by default. (warning, a setting under 80 might have a potentially visible impact)
Ignore SVG images: If enabled, all SVG images will be skipped from acceleration as anyway vector images will not be compressed.
Maximum "Pixel ratio": List of supported device pixel ratios, default is 2, eg: 2 for Retina devices
Custom Library Options: Those optional parameters will be added to the request for each URL going through the Cloudimage acceleration infrastructure. It can allow you to force image formats, apply automatic transformations or watermarking, and might be used for troubleshooting purposes. (for advanced users only, please refer to the official Cloudimage documentation here for the list of possible parameters)
Include Script
You can listen to any template events to include our script:
- Script
- Process Example
Override Template
To process your image through Cloudimage you have two ways to implement
-
Way 1: Use Twig Function
- Way 2: Define your own
- Update the image to
- Add script