The current embed for instagram is pulling in the embed into an iframe. This method does not allow the iframe to have the proper width and height.

By including instagram's embed js and changing the embed code it allows the instagram embed js to properly set the width and height of the embed.

Our site is responsive and we'd prefer to have the embed js to automatically set the width and height of the embed.

Existing issue
Issue with existing code

Fixed with embed js
Fixed with new code

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dodozhang21 created an issue. See original summary.

dodozhang21’s picture

Here's the patch for including embed js and updating the theme for instagram.

I know instagram doesn't really follow the standard video embed pattern but would like to know what the maintainer think about this direction. It would allow this module to support more social media embed such as facebook and twitter.

dodozhang21’s picture

Updated patch with the correct path in the patch.

dodozhang21’s picture

Updated patch with the correct path in the patch.

sokrplare’s picture

Tried out the patch and it is working well for me - with Flickr and other non-consistent aspect ratio media formats available, there needs to be some pattern here to allow for dynamic sizing.

dodozhang21’s picture

FileSize
284.1 KB
500.11 KB

Existing issue
Issue with existing code

Fixed with embed js
Fixed with new code

dodozhang21’s picture

Issue summary: View changes
sokrplare’s picture

Status: Active » Reviewed & tested by the community

Might be pre-mature RTBC here, but this patch applied cleanly and resolved as expected for me. Hopefully can get some other eyes on it at least and then I know fixes/changes will be made fast if needed.

minnur’s picture

Thank you for the patch. I will review it and apply shortly.

  • minnur committed 47e46ad on 7.x-3.x
    Issue #2701283 by dodozhang21: Fix Instagram embed issue.
    

  • minnur committed 3671a5b on 7.x-3.x
    Revert "Issue #2701283 by dodozhang21: Fix Instagram embed issue."
    
    This...
minnur’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.