mel47 Posted March 4, 2018 Share Posted March 4, 2018 Hi I want to exclude images of a certain width. I wrote a function, but it created an array instead of PageImages. How come I could ameliorate this? function resolution ($largeur, $hauteur, Pageimages $images) { $imageLarge=[]; foreach ($images as $image) { if ($image->width >= $largeur) { $imageLarge[]=$image->size($largeur,$hauteur); } } return $imageLarge; } Thanks Mel Link to comment Share on other sites More sharing options...
adrian Posted March 4, 2018 Share Posted March 4, 2018 1 Link to comment Share on other sites More sharing options...
Robin S Posted March 4, 2018 Share Posted March 4, 2018 You can use width in a find() selector with Pageimages, e.g... $wide_images = $images->find("width>1000"); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now