=== Offload, AI & Optimize with Cloudflare Images ===
Plugin Name: Offload, AI & Optimize with Cloudflare Images
Contributors: vanyukov
Tags: cdn, cloudflare images, image AI, compress, optimize
Donate link: https://www.paypal.com/donate/?business=JRR6QPRGTZ46N&no_recurring=0&item_name=Help+support+the+development+of+the+Cloudflare+Images+plugin+for+WordPress&currency_code=AUD
Requires at least: 5.6
Requires PHP: 7.0
Tested up to: 7.0
Stable tag: 1.10.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Offload you media library images to the Cloudflare Images service. Store, resize, optimize and deliver images in a fast and secure manner.

== Description ==

Offload your media library to Cloudflare Images and let it handle everything for you - store, resize, optimize and deliver images in the best possible format to your users.

= Why Overpay for CDN Plugins? =

With the avalanche of expensive plugins out there, it's time to switch to a smarter choice. Why should you pay more for something that deserves to be free?

= Simplify Your Image Management =

Offload your media library to Cloudflare Images! Let our plugin take charge:

* Store your images securely;
* Resize images to perfection without any manual hassle;
* Optimize them to ensure they load blazingly fast;
* Deliver in the most user-friendly format, ensuring satisfaction at every user's end.

= But wait, there's more! =

Image CDN - deliver images from a global network of servers.
Image AI - tag, caption and generate new images using AI.
Compression - optimize JPEG/PNG images to decrease file size without compromising visual quality.

= A Developer's Promise =

Born from personal need, this plugin represents a developer's dedication to the community. While it's still a work in progress, remember – it's crafted with real user needs in mind, not profit.

= Your Feedback Makes Us Better =

Found a hiccup? Yearning for a feature? Just shoot us a support request. Our commitment is to continually evolve to serve you better. Your wish is our command!

= Disclaimer =

Cloudflare, the Cloudflare logo, and Cloudflare Workers are trademarks and/or registered trademarks of Cloudflare, Inc. in the United States and other jurisdictions.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Follow the instructions in the setup wizard through the 'Media - Offload Settings' menu in WordPress
4. Enjoy

== Frequently Asked Questions ==

= How does this work? =

The plugin will use the Cloudflare Images service to host all supported images and serve them with the best possible settings to the user.

= Is this free? =

Yes, the plugin is 100% free. A Cloudflare account with activated Cloudflare Images option is required.
Cloudflare may charge a fee for the use of this feature, depending on the plan used.

= What are the supported image formats? =

You can upload the following image formats to Cloudflare Images:
* PNG
* GIF
* JPEG
* WebP

= Are there any other limitations? =

These are the maximum allowed sizes and dimensions Cloudflare Images supports:

* Images' height and width are limited to 10,000 pixels.
* Image metadata is limited to 1024 bytes.
* Images have a 10 megabyte (MB) size limit.
* Animated GIFs, including all frames, are limited to 100 megapixels (MP).

= Why are not all images being replaced in content? =

By default, the plugin relies on WordPress core functions to process images.
Some themes and plugins can implement their own image processing functions, which can prevent the plugin from replacing the image URLs in content. If you are experiencing this, try to enable the `Parse page for images` module in the plugin settings.
If something is still not working for you, please let me know by creating a support ticket on the plugin support forums.

== Screenshots ==

1. Plugin options and settings
2. Plugin AI modules
3. Quick and easy setup wizard

== Changelog ==

= 1.10.3 - 08.06.2026 =

Fixed:
* Improve account ID and API key validation

= 1.10.2 - 29.05.2026 =

Fixed:
* Security issue (CVE-2026-9860)
* Bulk delete (full offload) stops on error

= 1.10.1 - 18.03.2026 =

Fixed:
* Malformed links in image srcset

= 1.10.0 - 17.03.2026 =

Added:
* Integration with Geodirectory plugin
* Compatibility with WordPress 7.0

Enhance:
* Network settings management
* Code quality improvements

Fixed:
* Fix HTML links on dropdowns in media library
* Page parser not properly detecting images sizes for WebP and AVIF formats
* PHP warning: Implicitly marking parameter $value as nullable is deprecated
* PHP notice: Function _load_textdomain_just_in_time was called incorrectly
* Broken srcset parsing caused by unencoded commas in Cloudflare Image URLs
* Memory leak from setTimeout without cleanup in progress bar component

= 1.9.8 - 31.12.2025 =

Fixed:
* Version conflict

= 1.9.7 - 31.12.2025 =

Fixed:
* Fatal error with latest RankMath update

= 1.9.6 - 11.11.2025 =

Added:
* Track image changes and update images on Cloudflare

Fixed:
* Performance issues with network installs
* Network installs
* Prevent unauthenticated users from changing the settings

= 1.9.5 - 06.07.2025 =

Added:
* Support for Elementor gallery widget
* Support for Voxel theme gallery widget
* Support for SVG images
* cf_images_is_rest_request filter to control REST API requests

Fixed:
* Now all users with upload_files permission can offload images
* Full offload issue with GreenShift - Animation and Page Builder Blocks plugin
* RankMath overriding images when they are fully offloaded
* Fix "The web server cannot generate responsive image sizes for this image. Convert it to JPEG or PNG before uploading" error

= 1.9.4 - 14.12.2024 =

Added:
* Bulk offload actions to the media library list view
* Global option to disable processing in the page head section
* Additional TTL options (3, 6 and 9 months)

Changed:
* Improved UI/UX
* Improved logging to better catch offload errors

Fixed:
* Fix logs layout spanning off-screen
* Undefined array key PHP warning (props @ablears)

= 1.9.3 - 07.10.2024 =

Added:
* Integration with Smart Slider 3
* Integration with All in One SEO: allow controlling application/ld+json schema image URLs
* Integration with Rank Math: allow controlling application/ld+json schema image URLs
* Filter cf_images_disable_crop to disable auto cropping for registered crop images
* Background image support in Spectra plugin when styles are inlined (props @josephdsouza86)

Changed:
* Improve performance processing external images
* Rename 'cf_images_can_run' filter to 'cf_images_skip_image' so it's more clear what it does

Fixed:
* Images being replaced in RSS feeds, regardless of the settings
* Fatal error when a registered image size does not have height or width defined

= 1.9.2 - 17.07.2024 =

Added:
* Integration with WPBakery page builder image galleries
* Integration with Elementor Pro Gallery
* Integration with Flatsome theme gallery
* cf_images_upload_host filter to adjust the image host ID

Changed:
* Improve image AI modules
* Improve performance when Rank Math image SEO is active

Fixed:
* Only allow generating image alt text for supported formats (JPEG, PNG, GIF, BMP)
* Duplicate queries for images that are not part of the media library
* Rank Math image SEO module not working with custom domains

= 1.9.1 - 23.04.2024 =

Added:
* Integration with Elementor lightbox

Fixed:
* NaN undefined error in compression savings stats
* AI image captioning when custom image paths are set
* WPML compatibility
* "Disable WordPress image sizes" option causing issues with image URLs

= 1.9.0 - 22.03.2024 =

Added:
* Set browser TTL for images
* Option to serve originals for logged-in users
* Option to apply settings network wide in multisite

Changed:
* Disable logging in wp-admin
* Improve detection of cropped images
* Fallback to scaled images if original image is larger than 20 Mb

Fixed:
* Image size can now be changed in the Gutenberg image block for fully offloaded images
* Full size images not replaced in the gallery block on expand
* Multiple fixes and improvements with the WPML integration

= 1.8.0 - 16.02.2024 =

Added:
* Support for RSS feeds
* Auto crop option. If an image width matches the image height - auto crop the image.
* Use img width size. New option that allows using the img width attribute value for the image size, if the value is smaller than the requested image. 
* Bulk remove files from the media library.
* Bulk restore files to the media library.

Fixed:
* Page parser will now add the wp-image-* class to images that do not have it
* Page parser not detecting images that have a custom title set in the media library

[Full changelog](https://github.com/av3nger/cf-images/blob/master/CHANGELOG.md).

== Upgrade Notice ==

= 1.7.0 =
EOY update. Bunny CDN integration, custom URLs and stats with Cloudflare workers and much more.

= 1.5.0 =
Huge update with lots of improvements and new features, new UI and image compression module.
