<p>I did find the solution i checked the basepath with the server hosting my project and it turned out that the relative path dosen't work like the absolute path, so i serached for the root in the server and i inserted the full path, it work !! thanks for letting me know this by myself :)</p>

CC BY-SA 3.0
2017-10-18T15:00:31.623Z
2017-10-18T15:00:31.623Z
Abdelhafid AABID
<p>Despite having tried the tips from <a href="https://craftcms.stackexchange.com/questions/827/image-transforms-returning-cpresources-url">Image transforms returning cpresources url</a>, I am still having issues with image-transforms.</p>

<p>the problem is when i put the image without transform it work fine, but when i add the transform parametre it vanish, and even i tried to apply transfom in the template, the image show up but without crop option, only adjust the width and height in the front.</p>

<p>I have tried clearing the cache and db table already as well as updating the asset index. I have double checked the sources paths and it is not a file permission issue.</p>

<p>I am running Craft Pro 2.6.2992</p>

<p>'generateTransformsBeforePageLoad' => true is set in craft/config/general.php</p>

<p>template-code :</p>

<pre><code>          {% set  blocWith = "large-12" %}
          {% if block.image.first.url is defined %}
          {% set imageUrl = block.image.first.getUrl('imagewidthlarge') %}
          {% set imageHeight = block.image.first.getHeight('imagewidthlarge') %}
          {% set imageWidth = block.image.first.getWidth('imagewidthlarge') %}

      {% endif %}
              &lt;img src="{{ imageUrl ?? '404' }}" height="{{ imageHeight }}" width="{{ imageWidth }}"/&gt;
              &lt;div class="textBloc"&gt;
                {% if block.heading is not empty %}&lt;h2 class="m-b-20" style="color:{{ block.textColor }} !important" &gt;{{ block.heading }}&lt;/h2&gt;{% endif %}
                {% if block.subtitle is not empty %}&lt;h3 class="m-b-20"style="color:{{ block.textColor }} !important" &gt;{{ block.subtitle }}&lt;/h3&gt;{% endif %}
                {{ include(template_from_string(block.text)|raw) }}
</code></pre>

<p>this is what the page-source looks like</p>

<pre><code>&lt;img src="http://my-site.dev:8080/fr/cpresources/404?x=24sONoMIB" height="483" width="1202"&gt;
</code></pre>

<p>vu front :
<a href="https://i.sstatic.net/215JV.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/215JV.jpg" alt="enter image description here"></a></p>

<p>please i'm on a deadline on this projects i tryied all i could to work it out but still, i need this image transform to work </p>

<image-transforms><craft-features>
Image transforms return cpresources URL and doesn't apply crop
# Image transforms return cpresources URL and doesn't apply crop

(Asked by: username_0 on 2017-10-18)

Despite having tried the tips from Image transforms returning cpresources url, I am still having issues with image-transforms.
the problem is when i put the image without transform it work fine, but when i add the transform parametre it vanish, and even i tried to apply transfom in the template, the image show up but without crop option, only adjust the width and height in the front.
I have tried clearing the cache and db table already as well as updating the asset index. I have double checked the sources paths and it is not a file permission issue.
I am running Craft Pro 2.6.2992
'generateTransformsBeforePageLoad' => true is set in craft/config/general.php
template-code :
          {% set  blocWith = "large-12" %}
          {% if block.image.first.url is defined %}
          {% set imageUrl = block.image.first.getUrl('imagewidthlarge') %}
          {% set imageHeight = block.image.first.getHeight('imagewidthlarge') %}
          {% set imageWidth = block.image.first.getWidth('imagewidthlarge') %}

      {% endif %}
              
              
                {% if block.heading is not empty %}{{ block.heading }}{% endif %}
                {% if block.subtitle is not empty %}{{ block.subtitle }}{% endif %}
                {{ include(template_from_string(block.text)|raw) }}

this is what the page-source looks like


vu front :

please i'm on a deadline on this projects i tryied all i could to work it out but still, i need this image transform to work

**Tags:** image-transforms, craft-features

---

## 1 answers

### Answer by username_0 on 2017-10-18. Score: 1 | Accepted answer

I did find the solution i checked the basepath with the server hosting my project and it turned out that the relative path dosen't work like the absolute path, so i serached for the root in the server and i inserted the full path, it work !! thanks for letting me know this by myself :)


---

