Jump to content
apeisa

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.

Sorry!

Joss

Share this post


Link to post
Share on other sites

And if you reload the page is there the image ort not?

Have you got a empty new line.. I dont know. It is working fine here now. :-/

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

It works already. Have you changed an imagr field to a crop image?

Share this post


Link to post
Share on other sites

Yes. Now I have created a new field (named it again images,deleted the old one?) and the error still occurs.

Share this post


Link to post
Share on other sites

Is it insider a repeater or anything you found out? Have you chance to install on different machine that could help further?

Share this post


Link to post
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.

EDIT:

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.

EDIT 2:

Works now. Just followed the steps Joss described. 

Share this post


Link to post
Share on other sites

A complete aside:

Just working on a blog profile and I am thoroughly enjoying the plugin! So thanks!

Thought I would just say that.

Joss

  • Like 1

Share this post


Link to post
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,

-Brent

Share this post


Link to post
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:

https://github.com/apeisa/Thumbnails/blob/master/FieldtypeCropImage.module#L91

//if ($this->w != $sizer->getWidth() || $this->h != $sizer->getHeight()) {
  $this->_copyAndResize($img, $imgPath);
//}
  • Like 1

Share this post


Link to post
Share on other sites

This would be a nice preference to have on the module settings Antti.

Share this post


Link to post
Share on other sites

This would be a nice preference to have on the module settings Antti.

Maybe. Not sure. I hate settings :)

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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:

http://processwire.com/talk/topic/1448-proper-image-type-checking-instead-of-extensions-for-imagesizer/

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

Share this post


Link to post
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.

thanks

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

One step further...

I uploaded a png file and now the module works as it should, it correctly creates all the right sized images.

So it seems the trouble lies with jpg files.

Any ideas?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I've upgraded my 2.2.9 site to 2.2.15 and I can't get cropping to work at all - not with any image type. There's been no changes to my server that I know of.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      Images can be manipulated like native ProcessWire images (resizing, cropping etc.) Image names are fully searchable through the API Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message to help you edit those pages and remove references there before you can finally delete the image. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Choose whether you want to include child pages of page from step 2 to supply images Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...