Remove timthumb.php from my custom theme

Just delete your timthumb.php file. If your site thumbnails use timthumb then the code might look like this <img src=”https://wordpress.stackexchange.com/questions/80287/<?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’, array(‘class’ => ‘thubnail’));

Image resizing – TimThumb vs convert on upload?

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, … Read more

Is Timthumb still broken? What security measures should be taken?

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 http://code.google.com/p/timthumb/

Large image upload size (using timthumb.php

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 = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); ?> … Read more

TImthumb not working for absolute path

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() . “/timthumb.php?src=$url&w=80&h=80”;

TimThumb & htaccess : clean url

Cadeyrn’s code work probably for 1 specific size ( 200&w=350& etc) , the major problem with timthumb and the reason people use it, is that it allows for many dynamic sizes thus making .htaccess rewrite rules much more difficult, especially if you using friendly WordPress permalink structure. There is a guide here on how to … Read more

If Media Type .GIF

I’m not quite sure you’re using the wp_check_filetype() correctly. I just successfully tried the following to determine if the post thumbnail ext was jpg or not: $url = wp_get_attachment_url( get_post_thumbnail_id( ) ); $filetype = wp_check_filetype($url); if ($filetype[ext] == ‘jpg’) { echo ‘this is gif’; } else { echo ‘this aint gif’; } You probably know … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)