add_image_size – cropping images with arrays doesnt work.
-
Ive already posted topic in Hueman’s theme part of forum but noone replied. Well, i think now that posting there was a mistake because i believe its not Huemans fault.
Get to the core…
From 3.9 add_image_size has an nice option to use arrays as last parameter instead of booleans TRUE/FALSE. This way its possible to decide which side of picture should be cropped. But when i tried to do it with code like this:
`add_image_size( ‘thumb-small’, 160, 160, array( ‘center’, ‘bottom’ ) );
add_image_size( ‘thumb-medium’, 520, 245, array( ‘center’, ‘bottom’ ) );
add_image_size( ‘custom-size’, 720, 340, array( ‘center’, ‘bottom’ ) );`after refreshing with “Regenerate Thumbnails” it doesnt work. I mean it does, but as it was with TRUE parameter, which means hard cropping equally from top and bottom. I also tried with other positions (left, right, top ) but none worked for me.
Just to be sure that function does work at all, i tried to leave this parameter empty and yes it behaves as it should, cropping images softly (they have all same width but heights are different).So is this function broken or i do something wrong? Im using 3.9.1 wordpress
- The topic ‘add_image_size – cropping images with arrays doesnt work.’ is closed to new replies.