Answers.Body: <p>The return from <a href="https://docs.dukt.net/twitter/v2/craft-twitter.html#get-uri-query-headers-options-enablecache-cacheexpire" rel="nofollow noreferrer"><code>craft.twitter.get()</code></a> is not an array of tweets, but a response object, where the actual tweets are nested in an attribute called <code>data</code>.</p>
  
  <p>Not tested, but from looking at the plugin docs, something like this should do it:</p>
  
  <pre><code>{% set response = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %}
  
  {% if response.success %}
      {% for tweet in response.data %}
          ...
      {% endfor %}
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-17T00:16:32.053Z
Answers.Text: Thank you for explaining, Mats. The images are showing now, albeit unlimited versions from each, per list item line. Not sure how to limit the output when a for loop includes a conditional...
Answers.UserDisplayName: Nutmeg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-17T06:56:46.380Z
Answers.Text: @Nutmeg Not sure I follow, sorry. If you're talking about limiting the number of tweets, you could use the `count` parameter, i.e. `craft.twitter.get('statuses/user_timeline', { tweet_mode: 'extended', count: 5 })`.
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-16T20:56:02.933Z
Answers.LastActivityDate: 2018-08-16T20:56:02.933Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Body: <pre><code>{% set tweets = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %}
  
  {% for tweet in tweets %}
      &lt;li&gt;
  
      {% if tweet.extended_entities.media is defined %}
          {% for item in tweet.extended_entities.media if item.type == 'photo' %}
              &lt;img src="{{ item.media_url }}"&gt;
          {% endfor %}
      {% endif %}
  
      &lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>Anything obviously wrong here? I tested the API with a {{ dump(tweets) }} which seems fine.</p>
  
  <p><a href="https://craftcms.stackexchange.com/questions/17305/is-it-possible-to-get-a-tweet-image-when-using-twitter-plugin/27302?noredirect=1#comment35764_27302">This</a> thread describes a similar issue but without a solution.</p>
  
Tags: <image><plugin-dukttwitter>
Title: Problem pulling Tweets with media using Dukt's Twitter API plugin
ThreadText: # Problem pulling Tweets with media using Dukt's Twitter API plugin
  
  (Asked by: username_0 on 2018-08-16)
  
  ```
  {% set tweets = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %}
  
  {% for tweet in tweets %}
      <li>
  
      {% if tweet.extended_entities.media is defined %}
          {% for item in tweet.extended_entities.media if item.type == 'photo' %}
              <img src="{{ item.media_url }}">
          {% endfor %}
      {% endif %}
  
      </li>
  {% endfor %}
  
  ```
  
  Anything obviously wrong here? I tested the API with a {{ dump(tweets) }} which seems fine.
  
  [This](https://craftcms.stackexchange.com/questions/17305/is-it-possible-to-get-a-tweet-image-when-using-twitter-plugin/27302?noredirect=1#comment35764_27302) thread describes a similar issue but without a solution.
  
  **Tags:** image, plugin-dukttwitter
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-16. Score: 2
  
  The return from [`craft.twitter.get()`](https://docs.dukt.net/twitter/v2/craft-twitter.html#get-uri-query-headers-options-enablecache-cacheexpire) is not an array of tweets, but a response object, where the actual tweets are nested in an attribute called `data`.
  
  Not tested, but from looking at the plugin docs, something like this should do it:
  
  ```
  {% set response = craft.twitter.get('statuses/user_timeline', { tweet_mode:'extended' }) %}
  
  {% if response.success %}
      {% for tweet in response.data %}
          ...
      {% endfor %}
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thank you for explaining, username_1. The images are showing now, albeit unlimited versions from each, per list item line. Not sure how to limit the output when a for loop includes a conditional...  
  > **username_1**: @username_0 Not sure I follow, sorry. If you're talking about limiting the number of tweets, you could use the `count` parameter, i.e. `craft.twitter.get('statuses/user_timeline', { tweet_mode: 'extended', count: 5 })`.  
  
  ---
  
  