[Resolved] [Plugin: Tag Gallery] Temporary Fix to Thumbnail Issue
Consider this a reply to this closed thread.
I was having the same problem of thumbnails not displaying. I also didn’t want to use TimThumb due to the recent security issues and the fact that WordPress has its own built-in image-cropping.
I made the following changes to tag-gallery.php that fixed the issue and made it use WordPress’s built-in “Thumbnail” size. (Therefore, this fix will break the width and height attributes of the [tag-gallery] shortcode but allow you to manage the thumbnail size on the Settings > Media page.)
If you make these changes, know that you’re hacking the plugin and the changes will be lost upon upgrading. However, it sounds like a similar fix will be incorporated into the new version anyway.
Change Line 107 to:
$thumb = wp_get_attachment_image_src( $image['id'], 'thumbnail' );
Change line 120 to:
$output .= '<img src="' . $thumb . '" alt="' . $title . '" title="' . $title . '" />';
Add this line after line 209, inside the foreach loop:
$images[$key]['id'] = $value['ID'];
I also chose to delete the
tg_generateTimThumbUrl()function and the \timthumb\ folder just for security.
I really really love the concept of this plugin (particularly when used in conjunction with Media Tags). Seeing that it used TimThumb was disappointing, but it was easy to work around as you can see.
Thanks for the work @johnnypeck. I look forward to the next version.
- The topic ‘[Resolved] [Plugin: Tag Gallery] Temporary Fix to Thumbnail Issue’ is closed to new replies.