foogallery icon indicating copy to clipboard operation
foogallery copied to clipboard

patch for wpthumb 0.10 - no thumbnails created

Open manuel-84 opened this issue 9 years ago • 12 comments

line 406 of wpthumb.php

        $editor = wp_get_image_editor( $file_path /*, array( 'methods' => array( 'get_image' ) )*/ );

i had to comment out the "methods" arg to allow the creation of thumbnails. with the original code a "no image editor" error is thrown and the plugin will always use the original big images instead of the resized ones.

manuel-84 avatar Feb 19 '15 21:02 manuel-84

@bradvin Any chance you can provide a fix in for this issue soon? I'm not certain @manuel-84's fix here is the best solution, but the issue of correctly sized thumbnails not being used has been around for at least 6 months now.

jmotes avatar Aug 19 '15 17:08 jmotes

I have never been able to replicate this issue of no thumbs being created. If you can provide me a sure-fire way to replicate this then I will certainly fix it ASAP

bradvin avatar Aug 19 '15 19:08 bradvin

Thanks @bradvin! The only time that the thumbnails are used correctly is when they are set to the default 150x150 size. Any time you change that (to 50x50, for example), the gallery reverts back to the full-size image instead of the thumbnail. I've tested this on 3 websites with the same results.

jmotes avatar Aug 20 '15 04:08 jmotes

@jmotes I tried but still no luck. These are the steps I took:

  1. I changed the default image size to 50x50 in my dev environment.
  2. I then uploaded new images into a new foogallery.
  3. The default thumb size for the gallery changed to 50x50. I changed this to 133x111.
  4. Created a new page and added the foogallery.
  5. The thumbs were generated correctly. Example thumb URL : http://wp/wp-content/uploads/cache/2015/08/Chrysanthemum/-170130724.jpg

Can you perhaps walk me through the steps you are taking to reproduce this issue please.

bradvin avatar Aug 20 '15 06:08 bradvin

@bradvin Thanks so much for working with me on this issue!

Are your thumbnails actually 133x111 after you update the size or are they just being scaled to that by the width/height attributes? The steps I'm doing are the same as yours, but, for example, if I change the thumbnail size to 50x50 (from the default 150x150), the width/height attributes are applied to the image correctly, but my filenames will change from /wp-content/uploads/2015/08/picture-150x150.jpg to /wp-content/uploads/2015/08/picture.jpg, which is the full size (large) image, making the gallery load very slowly.

To re-iterate, the gallery appears fine visually, with the thumbnails sized correctly, but they are just being scaled to the correct size by the browser.

jmotes avatar Aug 20 '15 13:08 jmotes

@jmotes the thumbs are generated correctly and the actual dimensions are 133x111

Are you sure you have the php GD library installed on your server?

Please could you try something for me and install the latest develop version : https://github.com/fooplugins/foogallery/archive/develop.zip

There is a new menu item FooGallery->System Info. Please copy what is on there and paste it here. (you can remove anything you do not want shown publically like URLs and plugins loaded)

bradvin avatar Aug 20 '15 20:08 bradvin

Plugin version : 1.2.6 Plugin URL : http://local.dev/wp-content/plugins/foogallery-develop/ PHP version : 5.6.10-1+deb.sury.org~trusty+1 PHP GD Loaded : 2 Extensions Endpoint : https://raw.githubusercontent.com/fooplugins/foogallery-extensions/master/extensions.json Extensions Errors : Nope, all good Extensions : Array ( [0] => default_templates [1] => albums [2] => foobox [3] => custom_branding [4] => cube-gallery [5] => polaroid_template [6] => nextgen [7] => foogallery-owl-carousel-template [8] => foogallery-zoom-template [9] => foobox-image-lightbox [10] => thirstyaffiliates-for-foogallery-extension [11] => media_menu )

Extensions Active : Array ( [0] => default_templates [1] => photoswipe [2] => photoswipe-gallery [3] => media_menu [4] => foogallery-owl-carousel-template )

Gallery Templates : Array ( [0] => default [1] => masonry [2] => simple_portfolio [3] => justified [4] => thumbnail [5] => photoswipe-gallery [6] => owl-carousel )

Lightboxes : Array ( [photoswipe] => PhotoSwipe )

Active Plugins : Array ( [0] => foogallery-develop/foogallery.php [1] => foogallery-media-menu-master/foogallery-media-menu.php [2] => foogallery-owl-carousel-template/foogallery-owl-carousel-extension.php [3] => site-foo-photoswipe-lightbox/foogallery-photoswipe-extension.php [4] => site-foo-photoswipe-template/foogallery-photoswipe-gallery-extension.php [5] => soil-master/soil.php )

jmotes avatar Aug 21 '15 11:08 jmotes

You'll notice that I have custom templates in-use here. I did test with the default templates too though.

My dev environment is a Vagrant Scotch Box ( https://box.scotch.io/ ), which has GD and Imagick installed.

jmotes avatar Aug 21 '15 11:08 jmotes

@bradvin, I just set up a new local sandbox area and it's working correctly there! Let me troubleshoot some more to see if I can find what's triggering the problem.

jmotes avatar Aug 21 '15 12:08 jmotes

thanks for posting that @jmotes Is there any way that I can get access to your box to see this? If so, you can use [email protected]

bradvin avatar Aug 21 '15 12:08 bradvin

oh ok - I didnt see your lastest reply - let me know if there are any differences btw the new environment (where it works) and the other environments where it does not work

bradvin avatar Aug 21 '15 12:08 bradvin

@bradvin I was able to reproduce in the new sandbox, but only after installing the Roots Soil plugin from https://github.com/roots/soil that my other environments used. I guess I should raise the issue with them. Sorry to bother you with this!

jmotes avatar Aug 21 '15 12:08 jmotes