Articles on: Magento 2 Pearl Theme User Guide

Instagram widget - picture quality and layout optimization

The Instagram API handles picture formats in a specific way, which directly affects how images appear in the Instagram widget.




Image Format and Quality


  • 150x150 resolution
  • Images are retrieved in a square format, regardless of the original aspect ratio.
  • This ensures uniformity but can crop or distort images.


  • 306x306 or 612x612 resolution
  • Images display in higher quality.
  • The original aspect ratio of the Instagram post is preserved.
  • This may cause white spaces to appear for non-square images.




White Spaces in Non-Square Images


Depending on the format of your Instagram posts, choosing one of the higher-quality resolutions may result in white spaces being added for vertical or landscape images.


Here’s how the configuration looks in the widget settings:

instagram_rezolution.png




Solutions


Q: “Can images be cropped to avoid white spaces when Instagram posts contain vertical or landscape images?”


A: There are two approaches:


  1. Upload Images in a Consistent Format
  • Post all images in the same size/ratio on Instagram.
  • This prevents layout inconsistencies and avoids white spaces.


  1. Enable the “Optimize Image Layout” Option
  • In the widget settings, set Optimize Image Layout to Yes.
  • This automatically adjusts Instagram images of varying ratios to best fit your webpage layout.
  • Images maintain their original ratio without adding white spaces.




Demo


You can view how the Optimized Layout looks in action here:

Instagram Widget Demo




✅ For the best results, enable Optimize Image Layout to ensure Instagram images display cleanly across different ratios without adding white spaces.

Updated on: 16/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!