<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I would accept this method as long as it passes
security reviews. The problem with timthumb after all is said and
done really boiled down to security more so then anything else, else being the
implementation. What you described below constitutes a very valid
situational usage for image resizing functionality and very well thought out I
might add.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=sayontan@gmail.com href="mailto:sayontan@gmail.com">Sayontan
Sinha</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=theme-reviewers@lists.wordpress.org
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, February 11, 2011 5:33
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [theme-reviewers] Image
Resizing</DIV>
<DIV><BR></DIV>Hi,<BR>At the risk of flogging a dead horse I would like to
venture a few questions about image resizing. I know that this topic has done
the rounds several times, but I just wanted some clarity before uploading the
next version of my theme.<BR><BR>I was using TimThumb for resizing, which I
eliminated in my upcoming release. To do so, however, I had to use a few
tricks:<BR>
<OL>
<LI>I am using the concept of registered image sizes. So if you set a custom
size for an image, it is being added using the add_image_size function.
<LI>Now, considering the case where a size change is being registered after
the image has been uploaded, I am broadly using the method outlined <A
href="http://core.trac.wordpress.org/ticket/15311">http://core.trac.wordpress.org/ticket/15311</A>.<BR>
<LI>Note that for historical reasons I have functionality similar to the
"Get the Image" plugin in my code, whereby you could retrieve images based
on the featured image, or a custom field or an attachment or an embedded
URL. So it is imperative to have some kind of resizing functionality that
works above and beyond the native WP resizing capabilities (which I am
anyway using). This is where the above script comes really handy, but needs
a good few modifications. To cite a few examples:
<OL>
<LI>I have made the method work for external URLs, plus the size
parameters are actually based on the registered sizes and not "GET"
parameters.
<LI>The resizing is only invoked if an image of "intermediate" size (the
fourth parameter of wp_get_attachment_image_src()) is not returned by the
post thumbnail functionality. Also note that due to this means I cannot
use the_post_thumbnail by itself, but I have to use
wp_get_attachment_image_src(), which is called by
wp_get_attachment_image(), which is called by get_the_post_thumbnail(),
which in turn is called by the_post_thumbnail.<BR></LI></OL></LI></OL>The
result of the above is a seamless transition (hopefully) from my previous
approach that used TimThumb to the current approach. The reason I have gone
this route is so that users don't freak out when they see their images have
not been correctly resized. Suggesting to everyone that they have to run a
plugin every time they decide to change their image sizes seems to be fraught
with the risk of being lynched. <BR><BR>Is this going to be acceptable for a
review? I know that it is probably difficult to say without actually seeing
the code, but I thought I should try my
luck.<BR><BR>Regards,<BR>Sayontan.<BR><BR>-- <BR>Sayontan Sinha<BR><A
href="http://mynethome.net" target=_blank>http://mynethome.net</A> | <A
href="http://mynethome.net/blog"
target=_blank>http://mynethome.net/blog</A><BR>--<BR>Beating Australia in
Cricket is like killing a celebrity. The death gets more coverage than the
crime.<BR><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>theme-reviewers
mailing
list<BR>theme-reviewers@lists.wordpress.org<BR>http://lists.wordpress.org/mailman/listinfo/theme-reviewers<BR></BLOCKQUOTE></BODY></HTML>