Manual Image Crop source code
By Tomasz Sita, on WordPress.org since 2013. 8,000+ active installs.
Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image). Simply click on the “Crop” link next to any image in your media library. Below is its source code for every one of its 15 releases, what changed in the latest one, and how often it ships.
What changed in 1.15
Released Aug 13, 2026, 1 week after 1.14- Security: use one parsed attachment ID for both capability checks and crop/editor logic (fixes absint vs FILTER_SANITIZE_NUMBER_INT mismatch, e.g. attachmentId=4.1).
- Security: editor window reads postId only from POST (same source as the auth check; closes $_REQUEST vs $_GET mismatch).
- Security: enqueue crop assets/nonce only for users with upload_files.
6 files changed since 1.14: 6 modified, 0 added, 0 removed.
- assets/js/mic-media-modal.js modified, +72 bytes
- lib/ManualImageCrop.php modified, +448 bytes
- lib/ManualImageCropEditorWindow.php modified, +349 bytes
- lib/ManualImageCropGifFix.php modified, +298 bytes
- manual-image-crop.php modified, +606 bytes
- readme.txt modified, +373 bytes
Release history
15 releases since October 2013- 1.15 Aug 13, 2026 Security: use one parsed attachment ID for both capability checks and crop/editor logic (fixes absint vs FILTER_SANITIZE_NUMBER_INT mismatch, e.g. attachmentId=4.1).
- 1.14 Aug 2, 2026 Security: fixed missing authorization and CSRF on crop AJAX (Subscriber+ could overwrite arbitrary attachment intermediates / metadata). Discovered by Shivamani Vastrala (reported via WPScan).
- 1.13 Aug 23, 2025 Migrated from thickbox to WordPress Media Modal for better user experience
- 1.12 Sep 2, 2015 Fixed ‘streched images’ issue
- 1.11 Aug 26, 2015 Hungarian translation added