ankh2054 Posted May 6, 2014 Share Posted May 6, 2014 Hi All, I am probably dong something wrong here, but I am trying to resize images without cropping them, but images are still being cropped even when cropping is set to false. This is actually working. Using the below code: //Load the user via API $u = $users->get($username); //Will be single object of type Pageimage $avatar = $u->avatar; //Set Image array optons $image_options = array( 'cropping' => false, 'quality' => 90 ); //Check if avatar field is empty and assigns default image if ($u->avatar->url){ $thumb = $avatar->size(100,100, $image_options); $avatar_thumb .= "<img class='img-rounded img-responsive' src='{$thumb->url}'' alt='{$avatar->description}'' />"; } Link to comment Share on other sites More sharing options...
ankh2054 Posted May 6, 2014 Author Share Posted May 6, 2014 seems like this is working, but a image with 100x100 was already created so I think that was in the cache. Link to comment Share on other sites More sharing options...
Pete Posted May 7, 2014 Share Posted May 7, 2014 I think the thumbnail image you see in the admin when editing the page is the 100x100 automatically generated image you're seeing. That only shows if your images field has the thumbnails checkbook ticked. 2 Link to comment Share on other sites More sharing options...
ankh2054 Posted May 7, 2014 Author Share Posted May 7, 2014 thanks Pete 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