Crop the copies of images that WordPress creates instead of scaling them • WordPress Help

WordPress by default makes scaled copies of the images you upload to create others at reduced sizes, but how the size is never the same, and how you will always resize them to the same sizes, the ones you define in the multimedia settings, sometimes will not be seen correctly .

This is worse when you upload panoramic images and have a square size defined for the other sizes (the usual).

] Well, if you want to change this WordPress default behavior of scaling the images, and you prefer to cut them you just have to add this code to your file functions.php of the theme active or to your personal plugin :

add_filter ( 'post_thumbnail_html' 'wps_post_thumbnail' 10 3 ) [19659000];

function wps_post_thumbnail ( $ html $ post_id $ post_image_id ) {

$ html = '<span class = "removed_link" title = "' . get_permalink ( $ post_id ) . '">' . $ html . '' ;

return [19659018] $ html ;


Then, it would be convenient to make an adjustment in the loop so that if not there are thumbnails do not try to link to permalink in any way, this:

improving image management

If you do not know WP Smart Image II I'm sure you're missing out, not just a great plugin created by Darío Ferrer but many of the possibilities that WordPress offers for the adequate management of images, since it is integrated and greatly improves the functionality of inserting images in your site taking advantage of internal functions and vitaminizando its possibilities.

The first version of the plugin was a wonder, but when Darío reviewed his previous work he decided to completely revamp the plugin and create WP Smart Image II making it his raison d'être: an essential resource for the web designer but not only for the designer but for anyone who habitually uses images on their site created with WordPress.

It is important that you know that WP Smart Image II comes to be a replacement for the function ' post_thumbnail ', but not only replaces it but improves it. In this entry you have the full list of functionalities in front of the native WordPress function.

So committed is Darío with the project that until has created a Wiki in which to document – even beyond the reasonable – the use and motives of WP Smart Image II, another reason why it is worthwhile to support this project, from a Hispanic developer, from a friend, from a community partner that helps WordPress to get better every day, do not you think?

And you may wonder how to help this project? because the best way is to use the plugin in your sites, try it, inform Darío of any failure you find or improve that you can think of, you can also help in the development, downloading the latest versions in your own Trac .

If you are not yet convinced of what it contributes WP Smart Image II here you have its virtues …

Web development

  • Choose the output type of the function: echo or return.
  • Add custom classes and IDs to the images, in order to process them appropriately using CSS, javascript, PHP and other resources ..
  • Get the URL of the image instead of the full tag.
  • Add and define attributes to the links, such as "rel", "class", "id" and "target". [19659010] Separate the data of the images into pieces and show them individually (Height, width, file type, ID, etc.).
  • You can start the plugin in PHP Mode, saving you a few queries for common tasks of the system


  • Choose the image to display through a friendly box in your text editor
  • Show thumbnails in RSS feeds.
  • Customize sizes in RSS feeds.
  • Assign titles to the images directly from the box of your editor.
  • Choose any an image of your multimedia library and assign it to the article, even if the image is not linked to it.

Design and layout

  • Add attributes " width " and " height "Using CSS or HTML methods.
  • Customize the attributes" alt "and" title "of the images in case they do not have them.
  • Choose among all The default types of WordPress sizes available: Thumbnail, Medium, Large, and Full. Additionally you can create new default sizes with the Max Image Size Control plugin and manipulate them easily with WP Smart Image II
  • Configure and display default images if the entry does not have one. You can also choose not to use default images.
  • Link the image to the full article or version of the image (from any size), or leave it unlinked.
  • Add a link to the Full version of the image from the Miniature size or any size
  • Show random images for each entry (instead of just one).
  • Adapt the type of label to the DTD of your site for a correct W3C validation.

Do you still have doubts? to give an opportunity to what may be the future in the management of images in WordPress ?. Then do not say I have not warned you.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

Update your theme to WordPress 2.9

One of the novelties of WordPress 2.9 about to come to light, is the inclusion of image thumbnails in posts a functionality that will do more easy the development of magazine-type themes without the need to include additional scripts or plugins.

This new functionality, for your theme to support, requires a couple of changes in your current theme, namely …

1. In the file functions.php of your active topic:

2. In the files index.php and any other where you want the thumbnails to appear:

a Theme with feet and head • WordPress Help

 revolt-theme "title =" revolt-theme "width =" 284 "height =" 500 "class =" aligncenter size-medium wp -image-5296 "/> </a></p>
<p> Yes, really, this is a theme with <code> header </code> and <code> footer </code> taken to its fullest expression, <strong> with feet and head, literally </strong> This wonder that has warned me <a href= Juanma is a really interesting and novel, it goes out of the ordinary, and if not look at the screenshot above.

The hottest in this theme Revolt ) is how easy it is to customize it so that your face comes out in. You just have to modify the file edit_head.jpg add your face and change the name to head.jpg overwriting the existing one in the folder ' images ' of the theme.
 im_clean "title =" im_clean "width =" 420 "height =" 140 "class = "aligncenter size-full wp-image-5297 "/> </a></p>
<p> The use of thumbnails (thumbnails) of the theme is also very simple, since it is a magazine-style theme, it shows thumbnails of images on the cover. If you do not want to complicate you do not have to do anything, the theme will take the first image of your posts and will put them in miniature on the cover, and if you did not have images your posts will use the file '<code> thumbnail_default.jpg </code>' from the folder of images of the theme, image that you can also change for the one you like. </p>
<p> Do you want to add different miniatures ?, then it gets a little complicated -only a little- because you have to do the following: </p>
<li> Locate the folder <code> revolt-basic / thumbs / </code> via FTP and upload the thumbnails you want to use, in size 280 × 210px </li>
<li> In the widget <strong> Custom fields </strong> from the WordPress editor add a new field called '<code> thumbnail </code>' </li>
<li> In the field of <strong> Value </strong> enter the name of the file you will use, you do not need the full path, just the file name </li>
<p> As you can see, you can do it easy or difficult, you choose. In any case what you get is a theme that goes out of the ordinary, a full-fledged virginia. </p>
<p> The links you're waiting for are these: </p>
<li><span class= Revolt Theme direct download

  • Demo
  • What I have not had time (or desire, to deny it) is to translate it, and that is that it uses many images to show content, and Photoshop is not my thing, I'm sorry. If someone is encouraged to advise and publish it with all the honors.

    What's up Revolt ?

    NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

    Loading …

    That may also help you:

    How to disable image thumbnails in WordPress • WordPress Help

    If you're like me, you try to put images in each post you publish to make it more beautiful, that you're not good for the thumbnails (those two images that WordPress creates from a rise) and that you also do not like to occupy space without meaning on disk, then this "trick" will serve you.

    The idea is, as I said, not to allow WordPress to create those images that do not work at all (at least they do not work for me). The thing is quite easy and simple:

    We enter the panel and in Settings> Miscellaneous we look for the fields " Thumbnail Size " and " Medium Size " we both put a value of 0 .

    It's that easy, and with that no more thumbnails should be created.

    Thanks Neri for passing me the link in the forum .