Paragraph image URI with image styles in paragraphs-item.tpl I have Paragraph bundle with Multi Value Image Field which is limit of 3 numbers. i tried to print these three images separately because i want to used different image styles for each images. I tried like this:

&lt;img src="&lt;?php print image_style_url('size_400x600', $node-&gt;field_image['und'][0]['uri']); ?&gt;"/&gt;
&lt;img src="&lt;?php print image_style_url('size_750x524', $node-&gt;field_image['und'][1]['uri']); ?&gt;"/&gt;
&lt;img src="&lt;?php print image_style_url('size_550x365', $node-&gt;field_image['und'][2]['uri']); ?&gt;"/&gt;


In the code it display the uri without the file name like this:

&lt;img src="http://localhost/drupal/sites/default/files/public/styles/size_400x600/public?itok=3dkOjU1O"&gt;


What will be the correct way to do this?
Probably your best bet is to have something along the following in the 'paragraph--ptype.tpl.php' file:

&lt;?php print theme('image_style', array('style_name' =&gt; 'size_400x600', 'path' =&gt; $field_image['und'][0]['uri'])); ?&gt;
&lt;?php print theme('image_style', array('style_name' =&gt; 'size_750x524', 'path' =&gt; $field_image['und'][1]['uri'])); ?&gt;
&lt;?php print theme('image_style', array('style_name' =&gt; 'size_550x365', 'path' =&gt; $field_image['und'][2]['uri'])); ?&gt;


Where ptype is obviously the paragraph type that has this field.

I originally answered for Drupal 8 because I missed the D7 tag. Doh! I'm leaving the original answer below for reference.



First, a good way to apply an image style in an image field template:

{% for item in items %}
  {{ item.content|merge({'#image_style': 'size_400x600'}) }}
{% endfor %}


For your use case, you could do something like:

{% for item in items %}
  {% set style = 'size_400x600' %}
  {% if loop.index0 == 1 %}
    {% set style = 'size_750x524' %}
  {% elseif loop.index0 == 2 %}
    {% set style = 'size_550x365' %}
  {% endif %}
  {{ item.content|merge({'#image_style': style}) }}
{% endfor %}


However, since the twig code is starting to get complicated, you should probably think about handling it in a preprocess function.

Alternatively, you can do some of this at the paragraph template level (assuming the image field is on the paragraph):

{% if not paragraph.field_image.isEmpty() %}
  {% if not paragraph.field_image[0].entity.uri.isEmpty() %}
    {% set img_url = paragraph.field_image[0].entity.uri.value | image_style('size_400x600') %}
    &lt;img src="{{ img_url }}"&gt;
  {% elseif not paragraph.field_image[1].entity.uri.isEmpty() %}
    {% set img_url = paragraph.field_image[1].entity.uri.value | image_style('size_750x524') %}
    &lt;img src="{{ img_url }}"&gt;
  {% elseif not paragraph.field_image[2].entity.uri.isEmpty() %}
    {% set img_url = paragraph.field_image[2].entity.uri.value | image_style('size_550x365') %}
    &lt;img src="{{ img_url }}"&gt;
  {% endif %}
{% endif %}


You will need the twig_tweak module for that. Some of the safety checks in there may be extraneous. YMMV. As before, the complex twig code means this would be good to put into a preprocess function.