=== Comment Image to Media Library ===
Tags: comments, images, media library, subscribers, attachments
Requires at least: 6.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later

Upload one image with a WordPress comment, and save it in Media > Library. For signed-in commenters including Subscribers.

== What changed in 1.1 ==
* Uploads the image to WordPress's admin-ajax.php separately when selected, then posts the comment normally.
* Does not send a multipart image upload through wp-comments-post.php, avoiding hosting security rules that can block such requests.
* Shows upload progress/success/failure to the commenter before they submit the comment.
* Limits and periodically clears unused image uploads.

== Features ==
* One optional JPG, PNG, GIF or WebP image per comment.
* 5 MB maximum (or the server's lower limit); image dimensions are limited as well.
* Saved to the regular WordPress Media Library; attached to the commented-on post.
* Shown below the comment, subject to normal comment moderation/visibility.
* Uses the standard WordPress comment form and normal comment submission handler.
* No upload_files capability granted to Subscribers.

== Update ==
1. In Dashboard > Plugins > Add New Plugin > Upload Plugin, select the new ZIP.
2. If prompted, choose to replace the installed version with the uploaded version.
3. Refresh the article page in the browser (clear any page cache/CDN cache).
4. Choose a small JPG, wait for 'Image uploaded', then click 'Post Comment'.
5. Check Comments and Media > Library.

== Important ==
* This is designed for a standard WordPress comment_form() on public posts/pages.
* JavaScript and a working admin-ajax.php endpoint are needed to attach images.
* WordPress/hosting security plugins can block uploads to admin-ajax.php, too; if they do, check WAF/ModSecurity logs rather than disabling protection globally.
* Uploaded images are public by URL, including before a comment is moderated. Do not use this for confidential uploads.
* Pending uploads not attached to a comment are normally deleted by WordPress cron after 24 hours; a pending-image limit prevents unlimited accumulation.
* Images remain in Media Library after comments are deleted; remove them manually if needed.
