
Download WP Post Thumbnail 0.1.8
Update 27th May 2009: WP Post Thumbnail 0.2 Beta 2 has been released for testing. I urge you to install 0.2 Beta 2 because WP Post Thumbnail 0.1.8 codebase is not longer maintained.
WP Post Thumbnail plugin adds an image upload, crop and save panel in ‘Write Post’ screen. It allows you to easily upload a .jpg image file. Once the image file is uploaded, you can crop it before saving it as your thumbnail. That’s it.
Spend less time messing around with Photoshop everytime you need to make a thumbnail (or two) for your post. Also, saves you time and trouble from manually copy-and-pasting uploaded image URLs into custom key value fields.
For theme developers, particularly magazine-style WordPress theme developers, you can configure up to 3 different thumbnails to be used in each post. For instance,
- a big 320px by 180px widescreen thumbnail for leading featured post to be displayed prominently on the front page.
- a square 125px by 125px thumbnail for recent posts.
Dimensions as varied as your theme requires can be easily configured in an XML file. Save the file as ‘wppt.xml‘ and put it in your theme’s folder (ideally, the main folder but any folder will do). WP Post Thumbnail will scan your theme folders, look for your theme’s ‘wppt.xml‘ file and read your theme’s thumbnail(s) configuration.
Screenshots
1. WP Post Thumbnail default thumbnail in use

2. WP Post Thumbnail panel in ‘Write Post’ screen

3. WP Post Thumbnail configured to handle 3 thumbnails with different dimensions in a WordPress theme
![]()
NOTE: For a video demo, click here.
Installation
1. Copy the `wp-post-thumbnail` folder into your ‘wp-content/plugins’ folder.
2. Activate the plugin through the ‘Plugins’ menu in WordPress. That’s it.
Note: This plugin requires your upload folder (default: wp-content/uploads/ ) to be writable. Make sure this folder is write access enabled.
The default thumbnail is 160px by 90px which floats to the top left corner of the content of your post.
If your WordPress blog uses a theme that comes with pre-configured set of thumbnail(s) to work with this plugin, the theme’s folder should contain an XML file called ‘wppt.xml‘ created by the theme developer. In this case, it will override the default thumbnail. For theme developers, more information on how to configure WP Post Thumbnail for your WordPress theme can be found in FAQ.
Frequently Asked Questions
Q: I am developing a WordPress theme. How do I configure WP Post Thumbnail to work specifically for my theme?
![]()
Theme developer’s flow illustration (250Kb).
Opens in new window.
A: This is the purpose of which WP Post Thumbnail is written for. The current version of this plugin assumes that you, as theme developer, have basic knowledge of writing a configuration file in XML format and calling/placing the thumbnails’ custom field value within your theme.
For the visually inclined, click the thumbnail on the right to open an image that illustrates basically how theme developers can use WP Post Thumbnail to handle thumbnail(s) in their WordPress themes.
I have included a sample XML configuration file in the plugin’s main folder called ‘wppt.xml‘:
wppt.xml:
<?xml version="1.0" encoding="UTF-8"?> <wp-post-thumbnail> <pft_widescreen> <name>Widescreen</name> <desc>Recent posts</desc> <width>270</width> <height>110</height> </pft_widescreen> <pft_square> <name>Square</name> <desc>Category post and more</desc> <width>150</width> <height>150</height> </pft_square> <pft_rectangle> <name>Rectangle</name> <desc>Latest featured post</desc> <width>390</width> <height>270</height> </pft_rectangle> </wp-post-thumbnail>
The above sample XML file configures 3 different thumbnails titled <pft_widescreen>, <pft_square> and <pft_rectangle>. The node titles are also used as custom field keys to call specific thumbnails to appear in your theme. For instance, to get the square thumbnail:
Say, in your WordPress theme’s single.php:
<img src="<?php get_post_meta($post->ID, 'pft_square', true); ?>" />
Each thumbnail has four properties:
<name> specifies a friendly name to appear in the thumbnail tab in ‘Write Post’ area.
<desc> a short description about the thumbnail
<width> thumbnail width in pixels
<height> thumbnail height in pixels
IMPORTANT: All fields are required!
Save your file as ‘wppt.xml‘ and put it in your theme’s folder (any folder will do). Blogs that uses your theme, and has WP Post Thumbnail plugin activated, will detect your ‘wppt.xml‘ configuration file.
Q: Where are all the cropped thumbnails stored?
A: They are stored in ‘wp-post-thumbnail‘ folder inside your WordPress default upload path. Eg. '/wp-content/uploads/wp-post-thumbnail' by default.

Hi Stanley, Great idea for a plugin. I’m just having a slight problem. In the post admin, I keep getting the error ‘No such file or directory’ on lines 14 and 15 in /wp-content/plugins/wp-post-thumbnail/wppt_admin.php. I’ve made sure the wp-content/upload directory has write access and deactivated/reactivated the plugin several times.
Again, this is great idea to make blogging in WordPress easy for us common folk.
Hi,
Looks great but not working for me.
Options ae not dipslayed and when trying to open WP Post Thumbnail tab, I get these errors
Warning: mkdir() [function.mkdir]: No such file or directory in /home/pip/www/wp-content/plugins/wp-post-thumbnail/wppt_admin.php on line 14
Warning: chmod() [function.chmod]: No such file or directory in /home/pip/www/wp-content/plugins/wp-post-thumbnail/wppt_admin.php on line 15
Looks awesome, no more image software needed for cropping a single image, nice! Sure gonna try out.
David & MisetreB
Sorry about the error. I think I have spotted the bug and fixed it. Try downloading the plugin again.
Well, I’m using Post Thumb plugin in my theme and it nearly the same concept (everything is automatic even crop but I cannot choose wich part to crop). As Post Thumb seems not to be developped, it’s a nice solution of substitution. But I will have to create all the thumbs for old posts ? Too bad…
Could you give some more code examples of where you might put the code in an index page? I’m trying to figure out if there is a way I can use this in the Hamasaki theme, but I’m a little lost: http://www.jauhari.net/themes/hamasaki
—————————————-
Stanley: I downloaded Hamasaki theme for a quick glance. Hamasaki theme doesn’t make use of custom fields to assign thumbnail to posts. It looks for attached images, the first image attachment if I’m not mistaken, to be used as thumbnail.
What you should look for in Hamasaki theme’s index.php is this:
<?php$id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern = '!<img.*?src="(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$image_src = $matches['1'][0];
?>
<div class="tumbr" style="z-index:2;margin-left: 10px;float:right; width: 295px; height: 190px; background: url(<?php if($image_src != '') { echo $image_src; } else { ?><?php bloginfo('template_directory'); ?>/images/no-img.gif<?php } ?>) 0 0 no-repeat; content: ".";"> </div>
If I were to modify Hamasaki’s theme to use custom fields, I’ll decide on a name for the thumbnail’s custom key. Eg. “myhamasaki_big_thumbnail”. Go to the parts of index.php that deals with thumbnails, replace the code above with this:
In the featured section:<?php if ( get_post_meta($post->ID, 'myhamasaki_big_thumbnail', true) ) { ?>
<img src="<?php echo get_post_meta($post->ID, 'myhamasaki_big_thumbnail', $single = true); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" width="295px" height="190px" />
<?php } else { ?>
<img src="<?php bloginfo('template_directory'); ?>/images/no_thumbnail_295_190.jpg" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" width="295px" height="190px" />
<?php } ?>
The code calls up ‘myhamasaki_big_thumbnail’ custom field value. If not found, shows a default no-image-found instead.
I don’t know if such a brief example if of any help to you. I’m not familiar with Hamasaki theme but I suspect you’d have to meddle with its CSS too as you can from the code, the author puts the thumbnail into a <div> class’s background image.
I can’t make the translation work. I just took the wp-post-thumbnail.po and translated it in spanish-venezuela and saved it like wp-post-thumbnail-es_VE.po with the adecuate wp-post-thumbnail-es_VE.mo, wich I uploaded to the languages directory of the plugin, but impossible to have it work. I have es_VE established in my wp-config.php file and other translated plugins are working ok. Can you help me?
Stanley: Sorry Nestor. I’ve made changes to the SVN to fix a typo error in the code. Can you download the plugin and try again, please? And thanks for taking the trouble to translate the plugin.
Hey, great plugin! One suggestion though: I would love to be able to control the quality of the thumbnails (like wordpress 2.6 does).
Thanks Stanley, now it is working perfectly for translations. But i just want to point some phrases that are not being translated. I saw at the code that they are not marked for translation, they are: “Default thumbnail left corner of content”, “thumbnail is not found. Make one
”, “and click Upload”, “Save thumbnail”, “Saving”, “Delete”, and “Deleting”. It Would be great if you could fix them.
Great plugin, you save a lot of time for the most of the wordpress users.
Stanley,
Great work. It should really encourage theme developers to start using more complex layouts as your plugin enables post creation easily.
I tried it today, on a fresh 2.6.2 install, and i ran into some problems. I upload a picture, i crop-reize it, but when i save it i get this: ““Widescreen” thumbnail is not found. Make one
”, and the image appears once again for crop resizing. Also, if i go to Write -> Post, the same images appaears again on a fresh post.
Any ideas on how i can debug this?
Thanks for the update but I delete initial plugin, upload new files and got the sames errors
Hi Stanley!! I just fixed the strings. I marked the strings for translation and it is working ok. I repackaged the whole plugin with all of the changes included, my spanish translation and a changes.txt files reflecting all of the changes I made to the files.
Due to there is no option to contact you by email I posted the package in rapidshare and publish the link in here.
http://rapidshare.com/files/156286056/wp-post-thumbnail.rar.html
Check it.
Sorry, I forgot to compile the .mo files in the previous package, download this instead.
http://rapidshare.com/files/156288329/wp-post-thumbnail.rar.html
Stanley: Hey, thanks! I’ll include your language files in the following plugin update.
I have the exact same problem as tricky. It keeps showing “”Widescreen” thumbnail is not found. Make one
”, although the thumbnail is actually created.
I’ve just realized that this happens when you’re writing a post for the first time, but not when editing an existing one.
Stanley: I’m looking into this as I write. It had something to do with adding custom fields before a post is saved issue. When writing a new post, save your post first before adding custom fields. WordPress auto-saves your post as draft as soon as you write a post title.
Best to leave making thumbnails the last thing you’d do when writing a post. Or at the very least, write a post title for auto-save to kick in, then make thumbnails.
Fixing this is on top of my list of to-do stuff.
I’m to sure if this is the place to report bugs, but here you have two more:
- The “style” tag added to header hasn’t got the “type” attribute, so it’s not XHTML-compliant.
- Images with extension other than “jpg” (e.g. “jpeg”, “JPG”) are not allowed and maybe should be.
Can’t seem to get it to work with a custom XML file. I followed all directions and I’m just getting a blank wp-admin page when the XML file is in place.
Any ideas? Thanks for this awesome plugin!
Stanley: Bug noted. In the meantime, you may wanna look into MacDojo.com digging into the codes and hardcode the thumbnail(s) configuration.
I click the button to find the picture, choose a small jpeg file 25k and then click upload. It just spins forever and nothing happens.
uploads dir is chmod 777
anything else that may cause this prob?
Is this plugin meant to be working now? I just receive a message saying that my picture has uploaded successfully, but that is all. No cropping, no other options and more importantly, no image in my post : (
Im running wordpress 2.6.2 with an alteration of the kubrick theme, I have also ensured that my directory is writeable,
Great idea though,
Nick
Hi Stanley. I suggest you to add the atribute type=\”text/css\” to the string:
echo "<!--in wppt.php line 237
It was causing my site to stop validating as XHTML 1.0 Strict.
I added it and now it’s perfect
Stanley: It has been fixed as the missing type declaration was pointed out by another commenter above. The fixes will also include problems with creating thumbnail directory in the next update.
BTW, I’ve emailed (gmail) you two days ago.
Getting the exact same issue as shawn earlier; The loader graphic is in limbo. The image does get uploaded to the post thumbs directory, but never displays properly. I’m running WP 2.6.3.
Im using this plugin so that my news moderators can upload our own images and have the ability to use this plugin instead of the themes custom fields, I can upload, I can save file everything saves alright but it doesnt show on the news post? Any Ideas to point in a direction. Im using the Revolutions Pro Media Theme.
I’ve installed this plugin on a local installation of wordpress running at LAMPP (Ubuntu server) and it’s working, but on wordpress running on XAMPP (windows XP) it doesn’t show the image crop area: this could be a same problem with Shawn and Solomon (comments above). Any idea why this is happening? WP Files on my LAMPP and XAMPP are the same.
I got it to work using the default call string because when i put the wppt.xml file in any of my template directories i get this error
Fatal error: Call to undefined function: simplexml_load_file() in /homepages/13/d254053766/htdocs/wp-content/plugins/wp-post-thumbnail/wppt.php on line 137
If anyone knows anything please give me a shout at teamhgn@gmail.com
Anyone else get stuck on the upload process? My photos won’t upload after cropping.
Админчег
У меня к тебе небольшое предложение, хоть и не по теме блога
Напиши пожалуйста свой обзор передачи Гордон Кихот. Особенно прошлый выпуск, про Шансон.
Спасибо
Удачи дружище
After i succesfuly used the script for two days, today i have a problem. Image still loading… when i upload for cropping
”
WP Post Thumbnail
Loading original image for cropping …
”
Plugin deactivated, reactivated. Nothing happend.
Image still loading…
I have rebooted the server, nothing hapend. Image still loading.
What’s the problem?
Hey just to tell that I have the same pb than Vincent, I solved it removing the xml file from my theme directory and modding the wppt.php file :
line 167 :
$wppt_thumbnail_options = array(
‘wppt_widescreen’ => array(
‘name’ => ‘Widescreen’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘160′,
‘height’ => ‘90′),
‘wppt_square’ => array(
‘name’ => ‘Square’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘90′,
‘height’ => ‘90′)
);
Happy codding !
Hi, great plugin, it really helps me a lot.
Yet I have one issue on the blog I am using it for.
Somehow the thumbnail won’t get written to the custom field, there is no field created at all. I am although modifying the custom fields displaying with the plugins “More-Fiels” and “WP-CMS Post Control”, and I have deactivated the post revisions.
Have you ever experienced the same bug?
Stanley, I didn´t receive your mail with the plugin corrected, pls, send it again. it is causing me the problem to create the folder in upload directory
I just downloaded the last version and it is working ok, I will send you the spanish translation to your mail.
shawn and Chris, have you figured out anything to fix the getting stuck part? I’m seriously dying to use this plugin!
Why can’t I see all those options for cropping the picture? I installed it and apparently I did it well, I get the box for uploadinng the pictures but that’s it, I don’t get more options, for resizing or cropping.
Same here as Shawn, Chris, Solomon. It´s getting stuck after uploading an image.
It says it uploaded, ../uploads is 777, but it didn´t upload any picture, there´s nothing in the folder & custom fields are not created.
The area for cropping/resizing is not appearing after the “upload”.
Using WP 2.6.3 live, backend with both with Firefox and Safari on a Mac.
It´s a really, really great plugin! Hope any input can help to make it work. Thank you!
I have same problem as frank: “Why can’t I see all those options for cropping the picture? I installed it and apparently I did it well, I get the box for uploadinng the pictures but that’s it, I don’t get more options, for resizing or cropping.”
Any suggestions?
Thanks
Yeah I’m having the same problem. It uploads the image then gets stuck at “Loading original image for cropping … “
I am having the same problem, and have figured out a small piece. On my server, the upload is failing because the $imgFilePath variable in wppt_upload.php is not being set correctly (the full path is needed). If I use the following replacement on line 46, the file uploads properly:
$imgFilePath = realpath(dirname(__FILE__)) . ‘/../../uploads/’.time().’_’.$userfile_name;
Event though the file now uploads (verified via FTP), I still don’t get the options for resizing/cropping afterwards.
Hope this helps…
I got this working, and have to run so I can’t make a full description right now. But basically (ignore my earlier post) I had to force the full upload path into this variable:
$wppt_general_options['upload_path']
and then I hard-coded the thumb options in wppt.php:
$wppt_thumbnail_options = array(
‘wppt_widescreen’ => array(
‘name’ => ‘Widescreen’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘160′,
‘height’ => ‘90′),
‘wppt_square’ => array(
‘name’ => ‘Square’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘90′,
‘height’ => ‘90′)
);
and I also removed all the thumbnail directory creation stuff (so make sure you have uploads and uploads/wp-post-thumbnail created with 777.
I will try to make a more in-depth post later.
I’m getting a “Loading original image for cropping …” that seems to be stuck no matter what I do. Is there an update I’m not seeing?
Bump!
Maybe the error messages I get can help a little further:
[12:42:00] 1x PHP Warning: move_uploaded_file(/1226345671_box1.jpg): failed to open stream: Permission denied on line 60
[12:42:00] 1x PHP Warning: move_uploaded_file(): Unable to move ‘/var/tmp/phpQZTCdO’ to ‘/1226345671_box1.jpg’ on line 60
[12:42:00] 7x PHP Warning: chmod(): No such file or directory on line 61
.
.
So it has something to do with rights-management..? Why does the plugin wanna move sth. in the root of the server (and not in its ..uploads/wp-post-thumbnail)?
What can be done to make this great plugin work on any server-config?
I appreciate any help.
Hi there!
Can I make the thumbnails linkable to the specific posts?
Thanks!
Hey Andy,
Congrats on figuring out the fix! Can you share more details on how to do it? This looks like a great plugin, I can’t wait to implement it.
If you are receiving the “Call to undefined function: simplexml_load_file()” error, you most likely do not have php 5 installed on your webserver.
Hi and thanks for the plugin. Here’s a question: why bother with the XML settings file? I mean, XML is nice and everything, but wouldn’t it be easier to set the options with a plugin options page, and then just pass them to the wppt_init() function? I see a lot of people here are having problems with configuration (myself included), so I’m wondering if it would simplify things to let Wordpress take of handling options? I noticed that you have code potentially enabling users to do this, but it didn’t seem to be working for me. Anyway, just my random musings. Cheers!
Anyways so i tried hardcoding the php file like Andy and Manuel but still get an error.
Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /homepages/13/d254053766/htdocs/wp-content/plugins/wp-post-thumbnail/wppt.php on line 143
-.- I have no idea what to do if andy or manuel or anyone else would like to send me there wppt.php file i would appreciate it. to TeamHGN@gmail.com Thanks.
Here is a reference of what i have.
$wppt_config = new file_search(‘wppt.xml’, TEMPLATEPATH);
if (sizeof($wppt_config->found) > 0) {
$xml = simplexml_load_file($wppt_config->found[0]);
$wppt_thumbnail_options = simplexml2array($xml);
} else {
$wppt_thumbnail_options = array(
‘wppt_widescreen’ => array(
‘name’ => ‘Widescreen’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘160′,
‘height’ => ‘90′),
‘wppt_square’ => array(
‘name’ => ‘Square’,
‘desc’ => ‘Default thumbnail left corner of content’,
‘width’ => ‘90′,
‘height’ => ‘90′));
}
Also is there a way to change the file search for the xml file to a direct path so that it doesnt mess with my template. Ive heard other people saying that they cannot just put it in there template folder and have the plugin find it cause it messes with there templates as well. This might help for advanced editing. IM just not that good at php strings to make one?
Great looking plugin, but apart from lots of pain during installation it always makes the page jump to the “imgAreaSelect” after page loading. (Which sucks badly!)
Also it—for some reason—always displays the last uploaded image in the “imgAreaSelect”, which is definitely not what it’s supposed to do, is it?
Unfortunately I found the code to be quite badly documented/understandable, thus I couldn’t fix it.
So please consider this a request for a quick fix. I have a tight deadline coming close and would really want to use WP Post Thumbnail.
Got the same problem:
when trying to upload an image the “Uploading, please wait ..” phrase freezes
nothing shows up in the wp-post-thumbnail directory even though it has 777 set
Hi, great plugin – thanks for all your work!
Tweaks: What is doing the re-sizing? Is it Wordpress’ built in engine?
I’m trying to find out how I can adjust the .jpg quality… any help appreciated.
Cheers, Gareth
I’m having a similar problem to Shawn, Chris, and Salomon. I have a theory. Are any of you guys installed in a sub folder? In other words is Wordpress not installed in the root directory?
I had this plugin working and have since relocated my WP install to a sub folder. After doing this the plugin broke. And it seemed to me that what was missing was all the fancy Javascript. That got me thinking that it might be a path issue.
Can anyone with more knowledge of the plugin investigate that theory? I’d be very grateful. Thanks!
I tried for hours to get this plugin to work and could not. Like many people here, I just get “Loading original image for cropping…” and it never actually loads. I give up.
Stanley – great plugin! I’ve really wanted this for a long time… One thing I miss though. Why can’t I use the plugin with pages? It only supports posts. I know the name of the plugin is (…)post thumbnail(…), but I think most people could use this in pages also.
Just an idea.
Thanks for a great plugin.
Arnii
Matt, interesting! I am running Wordpress off a subfolder at least.
Nice work. I installed it and I am having the exact same issue as everyone else. Please let me know if I can help. Thanks, Drew
I have Wordpress MU 2.6.3, and I have this plugin working fine on 2 sites, but not the third. They all share the same template theme. How mad is that? I am baffled!
“Loading original image for cropping…”
But it never does!
Nice work
I am having problem, when I upload a file a message is coming “uploading please wait…”.
Nothing happening after a 5 minutes.
Please help.
Thank You,
Biju Subhash
Hello,
I was wondering if you were going to update the plugin to make it compatible with the latest version of WordPress. I find it amazing and would love to see it in action.
Hi, and thanks for this useful plugin. It had worked fine a few times when I ran into the the same “Loading original image for cropping…” issue as many people here. I was stuck with it until I thought of adding a extra character within the upload javascript in wppt_admin.php, basically just to break the script and stop it from running. That reset the script and got the “browse & upload” screen back.
I removed the extra character and tried with another image and the plugin worked properly again. But trying again with the first image, it broke down again the same way. Turns out that the image was blocked by Adblock Plus which caused the image not to load and thus broke the plugin After I disabled Adblock for my site, the same image loaded properly and everything worked.
Maybe that’s what is causing problems for at least some you too.
i along with everyone is having the “loading image” problem
any ideas anyone?
Is it working for wordpress 2.7 ? (great job)
great plug-in
however…
I’m having trouble getting it to work with
I’m still in the early stages of messing around with it but if anyone has any ideas of how to get it to work with query_post I’d really appreciate it.
What do I chnge so it will only try to put the image html code in if it found a thumbnail? (If not all posts have the thumbnail(s) like in my case.) Thanks!
think i’ve got it:
ID, ‘pft_widescreen’, true); ?>
<img src=”" />
Never mind. The issue appears to be that the plugin does not work on shared hosting servers. It tries to move the file to the root directory to which it has no access to. I hop this helps in the development of this amazing plugin. I have yet to see one match it’s caliber.
I’m having the same problem as nick.
after i browse the picture and click on upload it says “picture has been uploaded” but it doesn’t give me any option to crop. I chomde my uploads folder to 777 and its still empty. Any suggestions? I’m using wp 2.6.5. thanks
Anyways i use this plugin, its great thanks, but i think it leaves N’s on top of my page. If you highlight above my header you can see
thegamerzzone.com
is this because of
‘.”n” ???? That is included in the Head?
'."n"Great plugin! I love it.
New to designing my own Wordpress Theme and this came really handy. You can see a working example on my site.
Anyone out there who have any hints on how to improve the quality of the preview pictures taken by this plugin?
Hey Vincent,
It looks like you got past you original upload problem?? How did you do it???? HELP!
Would be awesome to get an update to the plugin. On the one hand this plugin is absolutely ideal, but on the other hand its current state is really the only thing stopping me from going live with my blog!
I am able to upload an image but it will only let me save one thumbnail called “widescreen”. I’m running WP 2.6.5.
This plugin could be really great. Please update soon.
The plugin only shows an option for widescreen…not the other sizes such as square. I am on wordpress Version 2.6.5
Hi. Great plugin. But Im a little lost on something.. Is there a way to display the description? I cat seem to figure it out.
Really love this plugin, especially the ability to manually crop the images using different set sizes.
But, and this is a big but, it was installed and functioning fine on my website, the site was a week from going live and I had about 20 test posts put up (with images of course), then out of the blue ALL OF THE THUMBS DISAPPEARED! With no warning and for apparently no reason.
Now my site is at a standstill because it needs those thumbs in order to function, I have nearly 3000 ‘posts’ that will be put up and can’t risk the thumbs going missing. It would be far too much work therefore the entire site is now on hold.
Help, any ideas why this happened, how to get the thumbs back and if there is a way of stop this from happening in the future? My website is currently being tested in my sandbox at http://elizabethpearce.ca/sandbox2
This is a surprise Christmas/Retirement present for my father, he’s planned on starting a business for 40 years but the market is now primarily online and he’s about given up and I’d thought providing him with an online site and showing him how easy it is to use the wordpress as a CMS he might cheer up). Now I’m starting to freak out it won’t be done by xmas.
I’m having the same problem with it getting stuck at “Loading original image for cropping …” I thought maybe it was because my image was too large, but it’s stuck after deactivating and reinstalling. Any ideas?
Not much happening here with fixing the Plugin, unfortunately.
@Arnii & for those wanting it to appear on PAGES also:
add this after around line 218 in wppt.php:
add_meta_box( ‘wp-post-thumbnail’, ‘WP Post Thumbnail’, ‘wppt_template’, ‘page’, ‘normal’ );
It adds the plugin´s box to the page´s write panel. You can leave the “filter” at line 218 for posts and add the line above to have the plugin appear on both posts and pages. Or replace line 218 with this one to have the plugin appear on pages only.
You better use a code like this in your loop.
<a href="" rel="bookmark" title="Lien Permanent vers "><img src="" alt="" />
Change pft_rectangle (2 times)with the tow others plugin solution.
Really not working just ‘Loading original image for cropping…’ would be great to have an update
I want to be able to post articles with thumbnails above the header on the main page. Can this plugin do it? Ive tried inbstalling the plugin and it does not seem to be woring, i’ve pasted in the code as well into my index.php file. Any suggestions?
here’s my site url http://www.criticalspeech.com
thanks
Really enjoying the plugin; nice user-friendliness for my client. However, it seems to have ceased functioning after an upgrade to WordPress 2.7. Any plans to release an update?
Thanks!
Please disregard my last comment; the interface to the plugin has suddenly reappeared again in my create-post and edit-post views. It must have been the deactivating and reactivating that did it. Cheers!
Stanley, great plugin!
I agree with Arnii (http://www.seoadsensethemes.com/wp-post-thumbnail-wordpress-plugin/#comment-386) though.
I think this should work with pages as well.
Help! I it uploads the file then… Nothing. Just as if i hadn´t. 777 permissions everywhere. I don´t know what to do, but loved so much this plugin. Plz send me an e-mail petsbr@gmail.com
I´m using 2.7 wordpress.
The plug-in is very useful!
I wanted to have the thumbnails be automatically sharpened. Here’s what worked for me (WP 2.7), if it’s useful to others…
1.) Torstein Hønsi has figured out how to do image sharpening using the GD library which is part of recent PHP distributions. Save the code he shares here
http://vikjavev.no/computing/ump.php
as /plugins/wp-post-thumbnail/UnsharpMask.php .
2.) Modify /plugins/wp-post-thumbnail/wppt_repository.php to add these lines into the wppt_resizeThumbnailImage function:
/*Sharpening. Using code from
http://vikjavev.no/computing/ump.php
UnsharpMask($imageToBeSharpened, $amount, $radius, $threshold)
The three parameters are akin to those in Photoshop’s
Unsharp Mask tool.
*/
include “UnsharpMask.php”;
$SHARPNESS_MAX_AMOUNT = 70;
$SHARPNESS_RADIUS = 3;
$SHARPNESS_THRESHOLD = 1;
/* If the thumbnail is the same size as the crop from the uploaded image we don’t need
any sharpening. But the smaller the thumbnail, the more we should sharpen,
so let’s do the simplest thing…*
$sharpness_amount = ceil($SHARPNESS_MAX_AMOUNT * (1.00-$scale));
$newImage = UnsharpMask($newImage,
$sharpness_amount,
$SHARPNESS_RADIUS,
$SHARPNESS_THRESHOLD);
/* End of the new stuff. Return to the original code….*/
imagejpeg($newImage,$thumb_image_name,82);
chmod($thumb_image_name, 0777);
imagedestroy($newImage);
imagedestroy($source);
return $thumb_image_name;
Stanley: Thanks for sharing these snippets of code.
looks like a very useful plugin
but seems that i’m having the same issue
endless loop at “Loading original image for cropping … ”
even after deactivating and activating thr plugin again,its still sitting on the same message.
I’m waiting for update for WP 2.7
I have the same issue…
Thanks for that plugin!
Is it possible to make the thumbnails link to the actual image?
Something like,
<img src=”ID, ‘pft_square’, true); ?>” />
but, what do you put as source?
Thanks for a great plugin!
Is there a way of increasing the quality or the compression?
thanks
Joe
On new install of wordpress plugin working well but in old one + update to 2.7 i get “Loading original image for cropping …” in loop, cannot wait for this great plugin please update
Hi,
Great plugin, in 2.7 if I close/minimize it I can not re-open it. It just opens a this box about 5 px.
To date my only answer was to reinstall WP long job!!!
Any help!!
Andrew
Hey everybody…I really liked this plugin but its not working with WP 2.7. I found another program that is doing the trick for me now: http://wordpress.org/extend/plugins/scissors/
You can see it in action at my site. I will make a tutorial video when I get a chance…
WP 2.7 working…
I was able to get the plugin to work in WP 2.7 by deleting the wppt_* options directly from the database. That is to say:
1.) Use something like “phpmyadmin” to connect directly to your database server.
2.) Navigate to the database for your installation and find the “options” table.
3.) That table has a hundred or so entries. You can just “Browse” through the table for the 2 or 3 that begin with “wppt_”[something]. Or (if you have thousands of entries) you could do a Search and put in “option_name like ‘wppt_%’” as your search criteria.
4.) Delete those options that begin with “wppt_”.
After I did this, the next time I tried to upload an image with wppt it worked just fine.
[I noticed that even after disabling the plugin and re-enabling it, my wppt options in the database were still those from an earlier installation. My suspicion was that maybe WP changed the way it stores array data in going from WP 2.6 to 2.7? And that disabling the WPPT plugin apparently doesn't erase the option arrays stored in the database? I don't know... but this worked for me :->]
Hi, do you plan to add the support for Png or Gif images?
using this in 2.7 – every time I select “Add New” under Posts – I scroll down to get to the WP Post Thumbnail area – the photo I uploaded LAST post is still there – !? I can then upload a new one and it updates, and I can crop / save / etc.. but that image stays, and next time I add a new post its still there – I’d love to use/support this plugin – but this will be confusing to the content manager of my site – Can this be fixed somehow?
is this maybe an issue with 2.7 ? Anyone else experiencing this?
thanks alot !!!
I tried the above and it makes no difference. After I click upload file, nothing seems to happen. I have double checked Permissions and tried in different browsers etc and this will just not work in WP 2.7
IE7 seems to show an error though saying:
Line: 31
Error: Object doesn’t support this property or method
URL: /wp-content/plugins/wp-post-thumbnail/wppt_upload.php
Such a shame it doesn’t work as it appears to be able to do exactly what I need it to.
Will there be an update in the near future adding 2.7 support?
Now it really works in 2.7
I installed this plugin for the first time in WP 2.7. Obviously it didn’t work. However, after changing one small piece of code it works perfectly.
1. Open your plugins folder.
2. Open the wp-post-thumbnail folder
3. Open wppt_options.php
4. At the very top of the file you will see this:
require_once ‘../wp-config.php’;
5. Change it to this:
require_once ‘../../../wp-config.php’;
6. Then move wppt.xml into your folder of your current theme and you’re done.
oh…
Well, it looks like there are a few more issues that need to be fixed.
The images will not save to the database or show up in the WP Post Thumbnail box until you save the post, and then come back and edit the post. Only then does the plugin function properly in WP 2.7.
Hope someone can figure this part out. I’ll look into it, as well.
Hi, great plug ! It work correctly in “local” but online i have this message in post admin “Loading original image for cropping …” and the file is not uploaded in the folder,
My folder is on 777 authorisation
Need help
Thank you Paul. Your workaround with the tables helped me very much.
1000 thnx.
I am having trouble with this plug-in using WordPress 2.7. I have the plug-in installed. On my post screen, it only gives me the tab to format the widescreen version. I do this, but can’t get it to show up in my post. Wondering why I can’t see the other two tabs for rectangle and square and why nothing makes it to my post.
Hello:
I installed this on my 2.7 and this is what I get in http error logs (of course no images on the front end):
Usage: file [-bcikLhnNsvz] [-f namefile] [-F separator] [-m magicfiles] file…
file -C -m magicfiles
Try `file –help’ for more information.
I’ve been caught about problem with image uploading by not responding with
“Loading original image for cropping …” problem and been trying to solve this problem follow recommendation from Andy.
my known issues, but didn’t have result:
1) by default plugin uploading image set message: “Loading original image for cropping …”
2) if i made some changes, code below^
$imgFilePath = $wppt_general_options['upload_path'].’/’.time().’_’.$userfile_name;
//$imgFilePath = realpath(dirname(__FILE__)).’/img/’.time().’_’.$userfile_name;
system messages that file uploads and goes to first screen (default state)
By via ftp file does not.
3) if i make clear install of wp 2.6 in home server plugin works correctly.
if i make install in existing wp with plugins and content it doesn’t working
maybe it’s compatibility with other plugins problem?
in addition 2 start of writing post page in admin interface of correctly clear install wp 2.6 cause “Loading original image for cropping”
Can you help solve problem with plugin?
It’s very useful decision to upload images for magazine-type journals, but plugin doesn’t working normally. I wonder this plugin and i’ve been made requirements specification for uploading images that your plugin do, before i seen it, but did’nt working..
Please help
ok. sorry for the above post. I forgot to mention i am on wordpress mu. it has much more problems than what I laid above (including the fact that the images are stored in blogs.dir/files/….)
So, any plans to release for this mu?
Hi Guys!
When we will see this plugin working in WP 2.7 ?
Here is don´t working…
Best Regards, Marco.
am i crazy? i really want to control the stroke and padding, margin of each thumb. im losing my mind here. where is the code located to do this?
If your stucked with “Uploading, please wait ..” you have to install GD library: http://www.php.net/gd
I am getting alert oly jpg images allowed though i allowed oly jpeg images..and also even if accepting it thumb nail is not getting displayed in the post..what could be the problem..
Hi,
I like the look of the plugin and I’ve got some way with it. However, I can’t get the full functionality out of it. I’m able to add a ‘widescreen’ thumbnail very easily but I’m not being given the options to add a ’square’ or ‘rectangle’ thumbnail. (see edgedebate.com/thumbnailproblem.jpg)
I’m using WP2.7 and have only just installed this plug-in.
As I said, I can successfully add a widescreen thumbnail. Any ideas why I’m not able to add a square one or a rectangular one?
Thanks,
Bruno
Paul’s outline was very helpful in finding the wppp elements from the database, however the plugin still fails to work. It seems others are discussing the very same issue at http://wordpress.org/support/topic/222800 too.
Do ANY Wordpredss plugins work….given its popularity, you’d think people creating & touting their plugs would make sure they work. Post-thumb and this one….both crap.
This plugin used to work a-okay for me (even on 2.7). I’m still developing a site, so to clear things up I dropped the database and started again- this time wppt:
* Ignores my wppt.xml file
* Goes into the infinite loop.
Any sign of a new release?
I had the problem with “Uploading please wait” and the icon spinning forever.
I tried uninstalling the other plugins i had and found that the Postie plugin was causing a conflict. Back up and running again now
I need to be able to upload bigger than 2mb files. Is there a way to change this?
Hello, I have the same problem, as rest of people – I browse for the file, then select one, click upload and then I can see “uploading… your image has been uploaded and then nothing.
When i turn on error reporting (by adding error_reporting(E_ALL); to first line in wppt.php) , I can see those errors:
Notice: Use of undefined constant wppt_style – assumed ‘wppt_style’ in /hosting/www/wordpress/www/wp-content/plugins/wp-post-thumbnail/wppt.php on line 253
Notice: Undefined variable: thumbnail_id_tabs in /hosting/www/wordpress/www/wp-content/plugins/wp-post-thumbnail/wppt_admin.php on line 127
The file isn’t beeing uploaded to default upload dir /wp-content/uploads/wp-post-thumbnail…
Worst thing is that on my local apache all works as it should. But on production server it doesn’t…
Can someone help me with it?
Thanks!
Thanks very much for this plugin, it’s exactly what I was looking for.
For those people who can’t see any other size options other than “Widescreen”, make sure the wppt.xml file is in your current themes folder. I originally edited the one in the plugin folder and wondered why it didn’t work.
The fact that it keeps the same image in the “scratchpad” area from post to post threw me a bit at first, until I realised it’s probably a feature and not a bug. However it would be great if this plugin was able to select source images from the media library rather than have to upload them in the post editing screen.
One other thing I came across, if the entry box is collapsed then the editing mask pops up at the top of the page when you go in to edit a post.
But other than those niggles, works great, thanks again.
Stanley: The next update which I’m testing out will be using the media library instead of uploading an image to the ’scratchpad’ area. This is a major difference compared to the current version. By having the thumbnail’s original big image stored within media library, users can easily go back to previous posts to recrop thumbnails and have it’s original image file readily accessible.
The update is essentially a completely rewritten code while maintaining the same functionality. Adding a couple of frequently requested features like more control over thumbnail generation – varying default sizes, jpeg quality setting, placement etc.
More updates on that later …
@Henk
Thanks for the tip! It works perfectly… I’m running WP 2.7.1, and the plugin is working without any problems, though I had some problems a while ago.
But after I moved all my domains to MT, everything is working. Old upload and resizing problems with the Next Gen gallery also just disappeared.
Just a note to you guys having problems with this plugin.
@David Sparks:
I think you must change PHP.INI upload size limit…
Find this line.
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
Thanks for the tip! It works perfectly… i runing 2,7,1
I’m still not getting this to work on my client’s site (wordpress 2.7.1). I am still getting the “Loading original image for cropping …” infinite loop.
I tried all of the above recommendations and none of them are effective. Are you planning to fix this plugging or are you going to let it die. It would have been very useful.
Where can i find the menu on the admin panel? It doesn’t appear… I’m using WP 2.7… I’ve installed correctly the plugin but nothing appears…
This plug-in was working great on 2.7 with some minor tweaks. The weird thing is, I decided
against upgrading, but still, somehow it broke again. Had it working for 2 months strait! Read the posts here, they will point you in the right direction. Someone should fork this! (if you don’t, I will!)
thats not working in my blog, it’s work before, but I move my blog to http://mydomain.com/blog/
and now thats not working, I don’t know whats wrong… I’m using wp 2.7
thanks…
In case when the plugin is not displaying the picture, this line used single.php in is incomplete:
<img src=”ID, ‘pft_square’, true); ?>” />
function get_post_meta() returns a string, and it needs a echo to display the string (in this case, the image path)
use:
<img src=”ID, ‘pft_square’, true); ?>” />
scincerement j ai beaucouuuup aim
Stanley, I just needed the regular expression ‘!<img.*?src=”(.*?)”!’ from the Brian’s comment. You saved me loads of time figuring out what the expression should be.
Your plugin looks great btw – I may just have a use for it.
Thanks bro,
Paul.
Hi Stanley,
your plugin is really really beatiful, thanks to share with us.
I think I’ve find a little bug: if you deactive the plugin, when you go to edit posts, you will find again the WP Post Thumbnail subpanel, but if you try to upload a jpg, you receive an error: Only jpg images under 2MB are accepted for upload
and this 2 error:
Warning: reset() [function.reset]: Passed variable is not an array or object in /…/wp-content/plugins/wp-post-thumbnail/wppt_admin.php on line 8
Warning: key() [function.key]: Passed variable is not an array or object in /…/wp-content/plugins/wp-post-thumbnail/wppt_admin.php on line
if you reactivate the plugin all is right, and your plugin works like a charm.
I hope this can help, some careless like me, to solve quickly this problem!
Thank you so much again!
Hi!
I have one big problem with this plug-in. Can I change the max upload size (currently 2mb)??
Any help is very much appreciated.
Arnii
The “Loading original image for cropping..” probleme solution:
wppt_admin.php line 94:
Original:
$original_file_URL = WP_CONTENT_URL.’/uploads/wp-post-thumbnail/’.$wppt_general_options['original_file_name'].$_POST["force_refresh"];
Replace to:
$original_file_URL = $wppt_general_options['upload_path'].’/’.$wppt_general_options['original_file_name'].$_POST["force_refresh"];
Papaam! Works fine with non standard upload folders and with Wordpress MU (2.6.3).
And an other upload url bug:
wppt_repository.php
line 94:
$thumbnail_url = get_bloginfo(‘wpurl’).’/wp-content/uploads/wp-post-thumbnail/’.$thumbnail_name;
replace to:
$thumbnail_url = get_bloginfo(‘wpurl’).’/’.$wppt_general_options['upload_path'].’/’.$thumbnail_name;
Any chance you are going to upgrade this for 2.7.1 support?
Peti it seems to work!
Thank goodness!
This is a great plugin.
This plugin is a service to humanity!
Just wanted to say a big THANK you for a plugin that beautifully overcomes the very biggest annoyances about working with images in WordPress. You’ve done us all a GREAT service and I can’t thank you enough.
@Peti,
It seems that this fix is only symptomatic, whereas it’s in fact not the cause of the endless spinning. In fact this actually breaks the plugin.
The real fix is to change the code as follows:
1 #### Includes ######
Make sure all the includes in the headers read:
require_once '../../../wp-config.php';this is the relative path from the wp-content/plugins directory to the root in a typical installation. It’s not the most robust solution, but it works in 99% of the cases where the WP directory structure is not changed by the users.
Affected files:
wppt_admin.php
wppt_options.php
wppt_repository.php
wppt_upload.php
2 #### Uploads ######
The upload path code is a bit strange, but can be simplified drastically:
Around line 153 of the wppt.php (starting from /* Argh! Lots of problem…
Comment this out:
/* Argh! Lots of problem creating thumbnail directory in plugin's initial release. *Embarassed*
Let me try again ... */
//$upload_dir = ABSPATH;
//$upload_dir .= str_replace(ABSPATH, '', trim( get_option( 'upload_path' ) ) );
//if ( empty( $upload_dir ) )
//$upload_dir = WP_CONTENT_DIR . '/uploads';
Replace with:
$upload_dir .= ABSPATH.'wp-content/uploads/wp-post-thumbnail';Affected file: wppt.php
3 #### Image cropping ######
Finally, when a user uploads the image for cropping, make sure the correct path is given to the image area select script!
Around line 46 of wppt_upload.php, make sure youve got the right $imgFilePath
$imgFilePath = $wppt_general_options['upload_path'].'/'.time().'_'.$userfile_name;and not
//$imgFilePath = realpath(dirname(__FILE__)) . Ô/../../uploads/Õ.time().Õ_Õ.$userfile_name;This solution was mentioned above and seems to work well.
This probably requires deletion of the settings in the wppt_* variables using phpMyAdmin because the paths there are incorrectly set in some cases and need to be rewritten.
Hello, great idea for a plugin, but for some reason I can’t upload images! Everytime I try to upload a JPEG it denies, saying that it only accepts images 2MB in size or under. However, the image I’m trying to upload is only 41 KB! Something I’m doing wrong? Let me know.
Cheers,
Sarah
<img src=”ID, ‘pft_square’, true); ?>” />
wouldn’t work for me. I had to change it to
<img src=”ID, ‘pft_square’, true); ?>” />
good..wp plugin. thank you
I tried all tweaks listed in the comments; no success. I just can’t get the plugin running. I keep getting the message; “Loading full image to crop”. I’m running WP 2.7.1. I was wondering mayb could post/publish a step-by-step guide to get it running on WP2.7+. Would really appreciate that; willing to donate. Best,
I was having problems with this plugin that were the result of special characters in photo filenames. The images with apostrophes or question marks etc. would be uploaded and the wppt_general_options record would be updated with the filename but the form would no longer work for loading the previously uploaded image, or a new image. I added the following code to wppt_upload.php starting on line 47 to remove the special characters from the filename before the image is uploaded and saved to the options table and it appears to have fixed this problem:
# Go to all lower case for consistency
$userfile_name = strtolower($userfile_name);
preg_match(‘/^(.*)(\..*)?$/’, $userfile_name, $matches);
# $matches[0] gets the entire string.
# $matches[1] gets the first sub-expression in (),
# $matches[2] the second, etc.
$stem = $matches[1];
$extension = $matches[2];
# Convert whitespace of any kind to single underscores
$stem = preg_replace(‘/\s+/’, ‘_’, $stem);
# Remove any remaining characters other than A-Z, a-z, 0-9 and _
$stem = preg_replace(‘/[^\w]/’, ”, $stem);
# Make sure the file extension has no odd characters
if (($extension != ”) && (!preg_match(‘/^\.\w+$/’, $extension)))
{
$error= __(‘Bad file extension’, ‘wp-post-thumbnail’);
}
# Put the full name back together
$userfile_name = “$stem$extension”;
Clean up code is from: http://www.boutell.com/newfaq/creating/upload.html
Hope this helps someone.
Jonathan Poole
Crap Plugin man, seriously… sort it out.