# إضافة تضمين إنستغرام - هل هذا ممكن؟

**URL:** <https://meta.discourse.org/t/instagram-embed-plugin-is-it-possible/91222>\
**Category:** Development\
**Created:** [29 يونيو 2018، 7:18م UTC](https://meta.discourse.org/t/instagram-embed-plugin-is-it-possible/91222 "2018-06-29T19:18:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cmwebdev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cmwebdev/32/122368_2.png) [@cmwebdev](https://meta.discourse.org/u/cmwebdev)\
**Post date:** [30 يونيو 2018، 3:02ص UTC](https://meta.discourse.org/t/instagram-embed-plugin-is-it-possible/91222/3 "2018-06-30T03:02:18Z")

</div>

@codinghorror thanks for the insight! After doing a search for “variable height” here on the forum, I’m surprised I did not come across that important info already.

From the API docs, this is the response:

```json
{
    "author_id": 9538472,
    "author_name": "diegoquinteiro",
    "author_url": "http://instagram.com/diegoquinteiro",
    "height": null,
    "html":"...",
    "media_id": "558717847597368461_9538472",
    "provider_name": "Instagram",
    "provider_url": "http://instagram.com/",
    "title": "Wii Gato (Lipe Sleep)",
    "type": "rich",
    "thumbnail_url": "http://distilleryimage5.ak.instagram.com/5dceebb02c5811e3b57222000a9e07e9_8.jpg",
    "thumbnail_width": 640,
    "thumbnail_height": 640,
    "version": "1.0",
    "width": 658
}

```

Here are the request parameters:

> **PARAMETERS**
> 
> | URL | A short link, like [http://instagr.am/p/fA9uwTtkSN/](http://instagr.am/p/fA9uwTtkSN/). |
> | --- | --- |
> | MAXWIDTH | Maximum width of returned media. This value is optional and must be greater than 320. Note that the maxheight parameter is not supported and always returns null. This is because the embed code is responsive and its height varies depending on its width and lenght of the caption. |
> | HIDECAPTION | If set to true, the embed code hides the caption. Defaults to false. |
> | OMITSCRIPT | If set to true, the embed code does not include the script tag. This is useful for websites that want to handle the loading of the embeds.js script by themselves. To manually initialize the embed code, call the JS function instgrm.Embeds.process(). |
> | CALLBACK | A JSON callback to be invoked. |
> | [https://www.instagram.com/developer/embedding/#oembed](https://www.instagram.com/developer/embedding/#oembed) | |

While the oembed `GET` request doesn’t give you the height, there is a link that can be visited that gives you a direct link to the image file.

**Medium Example:**  
[https://instagram.com/p/Bi44Jb6Da4n/media/?size=m](https://instagram.com/p/Bi44Jb6Da4n/media/?size=m)

**Large Example:**  
[https://instagram.com/p/Bi44Jb6Da4n/media/?size=l](https://instagram.com/p/Bi44Jb6Da4n/media/?size=l)

The dimensions from the medium link could be used to get the image’s proportions and then I could combine that with the width from oEmbed request response to get the height.

I’m assuming the “variable height” problem applies to the entire embed box though, not just the image/video, correct? If so, then the caption might introduce issues too.

---

_[View the full topic](https://meta.discourse.org/t/instagram-embed-plugin-is-it-possible/91222)._
