kriswallsmith / assetic

Asset Management for PHP
MIT License
3.76k stars 559 forks source link

Extension dropped when using vars with image twig tag #552

Open paxal opened 10 years ago

paxal commented 10 years ago

When using {% image %} tag with vars=["something"] and no output="whatever", the extension of the file is dropped.

This works in JS/CSS, because the default output name (eg css/*.css and js/*.js) already contains the extension. That is not true with images (images/*).

Example :

<assets>
    {% image "variable_input.{foo}.jpg" vars=["foo", "bar"] debug=true %}
    <url>{{ asset_url }}</url>
    {% endimage %}
</assets>

Gives

<assets>
    <url>images/84f96e1.a_variable_input._1.b</url>
</assets>

Instead of

<assets>
    <url>images/84f96e1.a.b_variable_input._1.jpg</url>
</assets>
paxal commented 10 years ago

Hi, Any news about this ? :)