Skip to content

Commit

Permalink
Merge pull request #137 from a2hosting/a2opt-731
Browse files Browse the repository at this point in the history
Add a limit to image library query
  • Loading branch information
supersoju authored Jan 10, 2024
2 parents a58b694 + 362f811 commit 704c3e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/A2_Optimized_Optimizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public function get_best_practices() {
],
'large_images' => [
'title' => 'Large Images in the Media Library',
'description' => 'Images larger than 1mb may not be properly optimized and could cause performance issues for your site visitors.',
'description' => 'Images larger than 1mb may not be properly optimized and could cause performance issues for your site visitors. For performance reasons, A2 Optimized only looks the latest 1000 images in your media library.',
'config_url' => admin_url() . 'upload.php',
'status' => $this->is_active('large_images', false),
],
Expand Down Expand Up @@ -1423,7 +1423,7 @@ public function is_active($optimization, $value_only = true) {

$args = [
'post_type' => 'attachment',
'numberposts' => -1,
'numberposts' => 1000,
'post_mime_type' => 'image',
'post_status' => null,
'post_parent' => null, // any parent
Expand Down

0 comments on commit 704c3e4

Please sign in to comment.