Tag Info

Hot answers tagged

6

WordPress image handling, without question. The only thing that TimThumb has that is currently not possible with core image handling is zoom crop. Everything else can be accomplished using core image handling, including on-the-fly resizing. I see absolutely no advantage to using TimThumb, and only disadvantages. It was a great tool prior to WordPress 2.9, ...


6

Best way: Remove the timthumb script from your server and change your theme so as to not require it in the first place. Timthumb isn't really necessary with newer versions of WordPress. The add_image_size() function can be used to create custom image sizes in the theme. And most older themes I've seen still using it were using it to create a "thumbnail" ...


5

Timthumb's ONLY advantage is in reducing the quantity of files stored on the server. By default Wordpress creates 3 images from each upload. If you add additional sizes it will create a new image file for each of those as well. Basic Usage: 1000 Posts with an average of 5 images per post will produce a minimum of 15,000 images. Using 5 custom sizes for ...


4

TimThumb has never been bundled with WordPress, it is/was entirely a third-party theme/plugin issue.


4

In my opinion the built in <?php add_image_size( $name, $width, $height, $crop ); ?> function is much more flexible, easy and with less overhead. It does resize-crop, so I don't see a reason to go back to TimThumb (which I used extensively in the past).


4

The fact that some images work tells me that TimThumb is behaving fine. If you go to the broken image url you will see that the error is 'no mime type specified' which tells me the issue is with the image rather than the script. I would suggest resaving the image and seeing if that fixes the problem. For reference this is the code that generates the error: ...


4

I choose the third option: http://wordpress.org/extend/plugins/custom-image-sizes/ It generates custom thumbnail sizes on the fly, while still being integrated into WordPress. Really, with that plugin around, you should never need to use TimThumb again.


3

I always do this with Timthumb: // this is the absolute path $url = 'http://crizaze.com/wp-content/themes/joorang/wp-content/uploads/2011/01/ami166a-e1295733091216.jpg'; // convert it into relative path $url = str_replace(get_bloginfo('url'), '', $url); // get the image url, resized by timthumb $timthumb_url = get_stylesheet_directory_uri() . ...


3

WordPress and TimThumb both use GD to resize images, so quality is going to be similar. GD's resize quality is not as good as Photoshop, you'll notice this especially in fine details. Both WP and TimThumb can be modified to use ImageMagick, WP via a plugin, TimThumb I think requires you edit the code directly, which is not ideal. ImageMagick will give ...


3

Instead of using timthumb, use the internal image API. Firstly, specify the custom size you're wanting to use by using add_image_size: Usage: <?php add_image_size( $name, $width, $height, $crop ); ?> So you would put this in your themes functions.php: add_image_size( 'large_post_image_header', 660,246,true); Then, instead of: <?php $image = ...


3

I would suggest using WordPress core image media management and thumbnail generation. Substituting TimThumb for this functionality is wasteful and unnecessary. Except for specific edge cases (i.e. zoom-crop), anything TimThumb can do, WordPress core functionality can do better.


2

Just delete your timthumb.php file. If your site thumbnails use timthumb then the code might look like this <img src="<?php bloginfo('template_directory'); ?>/xxxxx/timthumb.php?src=<?php echo "original image url" ?>&h=150&w=150&zc=1" /> Just replace those instances with code like this the_post_thumbnail('thumbnail', ...


2

TimThumb doesn't come with WordPress. Are you thinking of the SWFObject XSS exploit? That was patched in 3.3.2. http://codex.wordpress.org/Version_3.3.2 Nearly every WordPress update includes security updates. So if your goal is to make sure the latest security patches are applied, then the answer is: update to the latest version.


2

Take a look here: http://ma.tt/2011/08/the-timthumb-saga/ I assume you know who Matt is. Also, Matt mentioned this guy in that link, and he's got some updates on the issue posted to his site http://markmaunder.com/2011/08/01/zero-day-vulnerability-in-many-wordpress-themes/ The short is, there's now TimThumb 2.0 which is fixed. It's available here ...


1

I still consider timthumb.php to represent an inherent risk due to the way that it operates. As far as I know, the following statement remains true: NOTE: timthumb.php is inherently insecure because it relies on being able to write files into a directory that is accessible by people visiting your website. That’s never a good idea. Without looking ...


1

Unfortunately at moment Gravatar service itself only accepts single number for size and only serves square images. So you have to achieve it with CSS or download, modify and cache images.


1

As informed by @Rarst, apparently currently Gravatar only accepts one value for size. It is really unfortunate. However I managed to work-around this by facilitating timthumb.php and a function I found from here: How to get gravatar url alone I'm not sure if this is the best way to do this (it looks messy), however this works for me for creating 60x40 px ...


1

I had this same issue and tried the binarymoon fix... but it never worked out for me. But, I found this fix! http://wpcodesnippets.info/blog/how-to-use-timthumb-php-with-multisites.html Just copy paste the timbthumb.php file with the mulitsite fix in it and you should be good to go. Good Luck.


1

There are two reasons: post_thumbnail was introduced with WordPress 2.9, and many themes which used TimThumb because post_thumbnail wasn't yet available to them. TimThumb is more flexible than post_thumbnail — it gives you more options for how images are cropped, and allows for simple filters to be applied to the images. However, TimThumb has also ...


1

The Problem here lies within the Plugin, which utilizes the deprecated Function image_resize. I'm not 100% sure that this is the only Problem, but try rewriting the Plugin using the new [WP_Image_Editor][1] Class. The next Step to check is if the Plugin can write the files, and if the directory permissions are set correctly. See Line 128 of your code: ...


1

If folder permission are correct then it should work. Anyway try this one. And let me know how it goes. <img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php $featured_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); echo $featured_image_url[0]; ...


1

You need to use the global $current_blog instead. $GLOBALS['current_blog']->blog_id will return the correct id.


1

The file_exists() function is a built in php function and should work everywhere. But with the way you're doing it, is wrong. You cannot use a query string within a php file to check if the file exists. Just because its a valid link, doesn't mean the file_exists(). There is no file on your server by the name of /scripts/timthumb.php?src=* You need to do the ...


1

There are several plugins that allow you to attach images to categories/tags/taxonomy terms. Try googling taxonomy images site:wordpress.org/extend/plugins (the last part restricts the search to the Wordpress plugin repository) and you'll find a variety of recently updated plugins, including: Taxonomy Images - ...


1

99% of the issues I've had similar to this were when TimThumb simply ran out of memory. There's usually a direct correlation between image size and memory usage. The bigger the image is, the higher the chances it will run out of memory. To get a better idea of the error, access the timthumb url directly in your browser (not to the full-size image, to the ...


1

In your theme you need to add_theme_support('post-thumbnails'); and then set up some add_image_size(); By doing this in your themes functions file you'll get have support for the built in Feature images and any image sizes you set up images will be generated in the correct size. For more information on setting up images sizes the codex offers: ...


1

Sorry to hear. You may want to look through the steps and suggestions in this WP Answers post: Verifying that I have fully removed a WordPress hack?


1

I agree with Otto that is would be much better to use the_post_thumbnail and add_image_size but one other thing that timthumb does is crop images on the fly so on an older site with thousands of images you would have to use Regenerate Thumbnails to re-crop which would be quite a task especially on shared hosting. In addition to removing the allowed sites ...


1

Its some what of an old (bad) habit of developers from back when WordPress did not have thumbnail functionality or the add_image_size() function that can be used to create custom image size. The only thing that timthumb does better is side to side cropping instead of the WordPress built-in center box cropping. Don't get me wrong timtumb is still good but ...


1

add the size to your images sizes using add_image_size() to your theme's functions.php file. eg: if ( function_exists( 'add_theme_support' ) ) { add_image_size( 'index-thumb', 220, 180 ); // 220 pixels wide by 180 pixels tall } then set the image as featured image from the media uploader of the posts : then open your index.php and replace the image ...



Only top voted, non community-wiki answers of a minimum length are eligible