Jump to content

Release: Thumbnails


Recommended Posts

Sorry, I am lying, it is NOT working.

I have two image fields right next to each other, and I was trying with the wrong one.

So, whatever I try, it is not uploading images - they are just registering as deleted, or something.



Link to comment
Share on other sites

No, reloading just shows an empty field - and nothing in assets. 

So, it is actually not getting uploaded at all.

I am just going to try and create a new field with just the default setting and see what happens.

Link to comment
Share on other sites

Okay, update.

Created a new field. Save

Left all settings as default.

Added it to template.

It did not work.


Saved new field - leaving the settings as default.

It now works.

Changed settings.

Still works.

Not sure why I cannot get the other field to work, however. Something odd has happened during set up, I suppose, some combination that I have done.

Link to comment
Share on other sites

A quick note unrelated to the above.

There is an issue with Twitter Bootstrap (and probably other responsive frameworks) that the max width of 100% messes up Jcrop.

However, this can be solved by adding:

#bd img {
  max-width: none !important;
To somewhere. :)
And it is all better again.
Link to comment
Share on other sites

Downloaded the latest version from Github. Installed it on PW 2.2.14 (2.3) on a fresh installation running with PHP 5.3 - It works so far until I want to edit the crop area. Click on it just opens the new tab saying 

Unrecognized path

Hope you can come up with a working version for PW 2.3. This module is so useful. 

Link to comment
Share on other sites

Nothing. Just the basic-page template with a field called images or "bilder". 

Activating the Debug mode displays the full error:


TemplateFile: Unrecognized path

I've first checked the admin.php in the templates folder - it's there.

Older versions of PW with the module are running on the same server without any problems. Could try to install it on the machine here.


Ok, strange but known behaviour:

I've uninstalled everything and installed it again. Now I'm stuck at the upload with the error as Joss.


Works now. Just followed the steps Joss described. 

Link to comment
Share on other sites

I'm running into a small issue with the Thumbnails module where a client is uploading an original image which has the exact dimensions of the configured thumbnail size for the CropImage field... It's a case where the client knows the image dimensions used on the website, and tries to upload an original with the right dimensions (even though he doesn't have to) ...but he doesn't know enough to compress it.  

Strangely, the thumbnail is created as normal (I can use it in my templates), but compression is never applied if the dimensions of the original match the thumbnail dimensions.  So we're ending up with a lot of bloated jpegs slowing down the site.

It works fine, of course, if I click the 'thumbnail' link to custom-crop the image (with the jcrop interface), and just select the whole image as the cropping zone. But I don't want the client to have to do that. Better to just drag the file into the field, save the entry, and let ProcessWire work it's magic ;-).

Can I somehow tweak the module to force the compression of images in this case? Any pointers would really be appreciated...

Thanks for your time,


Link to comment
Share on other sites

Hi bcartier,

I think this is currently only possible with a little hack.

I took a look at the source of Thumbnails and if I'm right, you need to uncomment the if on line 91 here:


//if ($this->w != $sizer->getWidth() || $this->h != $sizer->getHeight()) {
  $this->_copyAndResize($img, $imgPath);
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I have a strange thing happening here.

I ported a PW 229 site with this working plugin from a development server to another server and when I upload a new image it shows just the same image in one size for all the thumbnail versions.

When I click on one image to crop, it shows the extra window and then I can select the crop section allright, I then click on crop and go and get the page that says:

wow that looks great, but no image shows up, when I click on wow that looks great I return to the image and when I now hover over the just cropped image, it shows an empty little hover screen where before it showed the uncropped image, if I then click save article I get the following error:

small_xxxx.jpg is an unsupported image type and then the whole page is not accessible anymore.

When I go into site/assets/files/files/1023 it shows small_xxxx.jpg with a filesize of 0, once I delete that I can access the page again.

When I check the log file it says:

2013-03-02 21:37:55    guest    http://www.xxx.xxx/    Error    Exception: small_xxxx.jpg is not a recogized image (in /xxx/xxx/xxx/xxx.xxx/public_html/wire/core/ImageSizer.php line 92)

I then upgraded to pw 2.2.15, same story.

I also tested on a new site (PW 2.2.15) on this same server and after uploading I went into the site/assets/files/1081 dir and see

featured_3145-xl.jpg     173.068 size

homefeatured_3145-xl.jpg     same 173.068 size

page_3145-xl.jpg  same 173.068 size

reference_3145-xl.jpg  same 173.068 size

So the module does replicate the files upon upload, but does not resize.

And after crop it changes the images size to 0 and prevents the page from showing in the front end AND the backend, I can only access the page in the backend again after deleting the 0 size image

Both sites now on PW 2.3 (=2.2.15?), but I took one site back to 2.2.9 stable and same issue.

Only difference between servers is OS, dev server was ubuntu (I think) new server is FreeBSD.

Link to comment
Share on other sites

Hi, - sorry, I might not of great help in this, but it maybe that this behave not only target the module but also the ImageSize-core:

you should post or reference in this Topic too:


The new site on the same server is pw 2.2.15 too?

Link to comment
Share on other sites

Hello Horst,

Thanks for posting in the other thread, yes I think it might have something to do with the resizer, but I am not familiar enough with how it all works under the hood so to speak.

The new site is on 2.2.15 as well, I reverted one to 2.2.9 and that did not make any difference either.

I wonder if anyone can say what dependencies the cropping feature needs for php extensions etc, I am almost inclined to believe it has to do with that.

The plugin itself seems to work partly, as in:

- after upload it makes different named versions of exact the same sized image, no cropping applied whatsoever

- when forced to do a manual crop it ends up making a new 0 sized version of the image, which freezes the page in the back end and the front end.


Link to comment
Share on other sites

OK, so I see that ImageSizer.php needs gd2, and on my server phpinfo says:

gd GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.4.11 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled

So it looks liek I have the extension I need for this to work, yet it does not work, any ideas?

Link to comment
Share on other sites

OK fixed!

I had to reinstall a few things on my server, so it had nothing to do with this plugin.

Just for anybody's information, I am on a freebsd server, using directadmin and had to go to:

/usr/ports/graphics/jpeg and make deinstall, then I had to make reinstall

then I went back into :/usr/local/directadmin/custombuild and run ./build php to rebuild php with all options, I chose to reinstall all options to get php compiled with GD supprt for jpeg

This module is truly awesome!


  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...