Dear Stelios,
The upload is done with WordPress, maybe you can use a generic plugin for cropping?
Regards,
Caridad
Hm...what you mean by a generic plugin ? I just need it to crop it so it keeps the aspect ratio at the dimensions we give to shortcode in functions instead of stretching to fit to the dimensions. Does it makes sense what im trying to say ?
Dear Stelios,
You can add an image size to WordPress with the configuration you need. Here you can specify if the image is cropped or not:
http://codex.wordpress.org/Function_Reference/add_image_size
Then you can use that image size in your code, replacing this line:
$image = wp_get_attachment_image_src( $attachment_id, 'yoursize' );
Let me know if you have any problems with this.
Regards,
Caridad
Caridad, you are amazing.
Thank you very much for all you help and patience.
Cheers,
Stelios