Instagram API handles picture format in a specific way.
-> If you set the image to 150x150 - it will retrieve the pictures in a square format regardless of the image ratio you have in your instagram posts.
-> When you set the image resolution to 306x306 or 612x612, the quality of the pictures will significantly improve but Instagram API will maintain the ratio of the pictures from your original Instagram post.
Depending on the format of your instagram posts, selecting one of the higher quality options may lead to white spaces being added for non-square images. The solutions for this case are presented below.
Q: "I need to know if images could be cropped in order not to show white spaces when the instagram post contain a vertical image or landscape one."
A: There are 2 approaches for cases when you have random landscape / portrait images:
a. You can add images in the same size in Instagram account and that will fix the issue, or
b. You can use below option 'Optimize Image Layout [Yes]' - this option will take your instagram pictures that have random ratios and find the best match to showcase them in your web page while keeping the same picture ratio and not adding any white spaces.
Check our demo below to see how the Optimized Layout looks like: