What about image width/height attributes? Probably won’t be XHTML valid, but it solves your peoblem.
I appreciate the suggestion Unfortunately, like I said in the OP, using img attributes to size the image (a) changes aspect ratios and (b) doesn’t help situations like images in Nivo Slider (which is what I am trying to use the images for). Thanks though!
Well, for anyone who’s interested, I tracked down the code that constrains the image resizing (disallows upscaling).
//From function image_resize_dimensions() line 345-346 of wp-includes/media.php $new_w = min($dest_w, $orig_w); $new_h = min($dest_h, $orig_h);
If we were to make this change the limitation would be removed:
$new_w = $dest_w; //min($dest_w, $orig_w); $new_h = $dest_h; //min($dest_h, $orig_h);
Unfortunately, there is no appropriate action or filter hook to make this adjustment from a theme or plugin. I guess until WP offers this as an option there is no great solution here. I might try using a similar filter to the one mentioned by OrganicBee to generate the appropriate size if necessary.
You could possibly use Jquery to do it so it doesnt distort the image http://plugins.jquery.com/plugin-tags/image-resize
also for a wordpress reference http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/post-thumbnail-template.php theres a filter on line 70 that may do what you want in a “hack”EDIT : and line 62
Thanks for the info. I may have to end up going with a jQuery solution as a last resort.
The filter on line 70 might help, but I’m hoping to find a way to generate the larger image in the first place (on media upload) rather than adjusting things when it’s ready to output.
Gonna start digging through the media upload code now
Has anyone come across a way of scaling up / “upsizing” WordPress Post Thumbnails? My understanding is that, by default, WordPress will only generate the registered image sizes for an image upload if the original image is larger than the registered image size.
That is, if you upload a 600×400 image, and you have a registered image size that is 800×600 named “full-size”, the full-size image will not be generated – and therefore when you retrieve the image at full-size, expecting an 800×600, you get a 600×400 instead.
I’ve been thinking about this, and while I think upscaling is a bad idea from a graphical point of view (quality deterioration), I think from a user’s perspective this would be helpful (many users don’t want to deal with image resizing – they just want it to “work”).
I know timthumb can handle upscaling, but I want to use WP’s built in functionality for a variety of reasons. I also know I could scale the images via img tag sizes or CSS , but that (a) changes aspect ratios and (b) doesn’t help situations like images in Nivo Slider.
Anyway, if anyone has come across a clever way to enable WP thumbnail upscaling I’d love to know!
Well, I wouldn’t consider it perfectly fine to use someone’s work and sell it as their own work for a 100 times more as they invested and without even knowing how to customize it for their clients yet pretending to be the uber-developer – but it’s legal at least. So go ahead!
Glossy, I agree with what you said – that there can be moral issues involved. But that doesn’t seem to be the case at all with the OP. mkessler’s original post was specifically concerned with giving the authors their due credit and making sure he was following the guidelines appropriately. He’s clearly not looking to just turn around and sell the themes as-is to a client – he wants to develop child themes “to their exact specifications”. It doesn’t sound to me like he’s misrepresenting himself in any way.
Just want to make sure we don’t go scaring away legitimate and honest buyers by reacting this way with the respectable ones
Phoenix saidDo you still find that people ask lots of questions that are already answered in the documentation? I’m also wondering if it comes to this, could I have someone else who has really studied the documentation provide tier one support? Or are most of the questions you get higher level?
Good documentation can save you hours of support time.
You do get a lot of questions that are already answered in the documentation, as many users never read them before sending a support request. My solution to this is to put the docs online, which allows me to send them a link directly to the section of the help docs that contains their solution. Also, this alerts them to the fact that this resource exists, so hopefully they will check for their solution there before asking another question with a documented answer.
Having “live” docs online also means you can update the docs any time with new info and users can benefit.
Hopefully as you refine your product my making new releases and refine the docs by updating the guide and FAQs, you can whittle down the support requests the absolute minimum. I had a huge amount of support requests with my CodeCanyon item initially, but with those methods I’ve been able to greatly reduce the amount of time I spend on support.