1

I'm just trying out the imager plugin. It looks promising! I've set up the first usage example but I don't see any image on my site in the browser. The image is uploaded properly to the asset source but it seems that Imager is placing its transforms in a subfolder (in this case: '7' -> http://craft-imager.dev/imager/images/7/nature-13_d4e4e04a52bfbdbeab5ba4d2cf1d1390.jpg)

The subfolder '7' doesn't exists on my machine..

I did some digging around, but I can't figure out what's wrong. The directory 'imager/images' exists and is writable by PHP.

Any idea? Thanks in advance!

  • 1
    So, Imager outputs the url above in the template, but the file doesn't exist on the server? Have you customized your imagerSystemPath config setting? What platform are you on? – André Elvan Mar 20 '17 at 13:51
  • Hi André, Yes, that's what Imager outputs. The file doesn't exists on the server. I didn't customize the imagerSystemPath. It's set to: $_SERVER['DOCUMENT_ROOT'] . '/imager/'. I created the imager directory, but that didn't help. I also created the images directory inside the imager directory, but that didn't help either. Any idea? The following code (good old Craft code) shows the image ok by the way; {% set image = craft.assets().limit(1).first() %} <img src="{{ image.getUrl({ width: 1000 }) }}"> Thanks for your help! – Wieger Jelsma Mar 20 '17 at 15:57
  • I'm on a Mac. OS X El Capitan running Apache and PHP7 locally. – Wieger Jelsma Mar 20 '17 at 15:59
  • I took another look at the imagerSystemPath ;) Thanks! That worked! – Wieger Jelsma Mar 20 '17 at 16:07
  • 1
    Would you mind adding what worked for you as an official answer @WiegerJelsma in case someone else runs into this? – Brad Bell Apr 11 '17 at 23:02
1

Solution:

I have this line inside my config. define('BASEPATH', realpath(dirname(__FILE__) . '/../') . '/');

And inside the imager config file imager.php I have: '.dev' => array('imagerSystemPath' => str_replace('craft/','images/', BASEPATH),

So, make sure the paths are all set according to your environment / directory structure.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.