Download the PHP package nx6/cloudflare without Composer
On this page you can find all versions of the php package nx6/cloudflare. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nx6/cloudflare
More information about nx6/cloudflare
Files in nx6/cloudflare
Package cloudflare
Short Description Magento 2 module that offloads product and CMS image resizing, compression and reformatting to Cloudflare Image Resizing, and adds responsive mobile srcsets to the product gallery.
License MIT
Homepage https://github.com/tinchodev/magento2-cloudflare-image-offload
Informations about the package cloudflare
Nx6_CloudFlare
Offloads Magento 2 product and CMS image processing to
Cloudflare Image Resizing,
rewriting image URLs so Cloudflare resizes, compresses and reformats them on the
fly instead of Magento's PHP image processor. It also adds responsive mobile
srcsets to the product gallery on the PDP and PLP.
| Package | nx6/cloudflare |
| Module | Nx6_CloudFlare |
| Version | 0.1.0 |
Requirements
- Magento 2.4.x (Open Source / Commerce), PHP 8.3+
- A Cloudflare zone in front of the store with Image Resizing enabled (Cloudflare dashboard → Speed → Optimization → Image Resizing)
Installation
What it does
- Rewrites catalog product image URLs (
Magento\Catalog\Model\View\Asset\Image,Magento\Catalog\Model\Product\Image,Magento\Catalog\Block\Product\ImageFactory) to go through Cloudflare's/cdn-cgi/image/resizing endpoint instead of Magento's local image cache. - Plugs into the WYSIWYG template filter (
Magento\Widget\Model\Template\Filter) to optionally optimize images referenced in CMS content. - Overrides the product gallery block (
Magento\Catalog\Block\Product\View\Gallery) to attach optimized image URLs and, when enabled, a set of extra mobile image sizes (srcset) for the product details page and listing pages. - Exposes per-image optimization parameters (compression, quality, format, fit)
appended as Cloudflare resizing URL params. Setting a field to
None/Originalomits that parameter and lets Cloudflare use its own default.
Configuration
Stores → Configuration → Nx6 → CloudFlare
General
| Field | Description |
|---|---|
| API Key | Cloudflare API key (stored encrypted). |
Image Optimization
| Field | Description |
|---|---|
| Enable Image Optimization | Master switch for routing catalog images through Cloudflare. |
| CMS image optimization | Also apply optimization to images referenced in CMS/WYSIWYG content. |
| Compression | None or Fast — see Cloudflare docs. |
| Format | Output format (only when Compression is None) — docs. |
| Fitment | Resize fit mode — docs. |
| Quality | Original or 50–95 — docs. |
Mobile Images
| Field | Description |
|---|---|
| Enable for PDP | Generate an extra srcset for the product details page gallery. |
| Size list (PDP) | Comma-separated widths, e.g. 320,640,960,1280,2560. |
| Enable for PLP | Same, for product listing pages. |
| Size list (PLP) | Comma-separated widths. |
Compression, Format, Fitment and Quality are website/store-view scoped, so
different stores can apply different optimization settings. The enable/disable
toggles are default-scope only.
Compatibility
Magento 2.4.x, PHP 8.3+.
Structure
License
MIT — see LICENSE.
All versions of cloudflare with dependencies
magento/framework Version >=103.0
magento/module-catalog Version >=104.0
magento/module-store Version >=101.1
magento/module-config Version >=101.2
magento/module-widget Version >=101.3
magento/module-media-storage Version >=100.4
magento/module-configurable-product Version >=100.4