[wp-hackers] Thumbnail creation question
Bill Erickson
bill.erickson at gmail.com
Mon Jul 2 13:29:26 UTC 2012
There's a great code snippet on this trac ticket (
http://core.trac.wordpress.org/ticket/15311 ) that allows dynamic image
resizing. You specify the dimensions and if it should be cropped, and the
function checks to see if that image size exists, and makes it if it
doesn't.
I'm using it on a site right now that would have had about 15 custom image
sizes throughout their site, but only one or two would have been used per
image uploaded.
---
Bill Erickson
WordPress Consultant
http://www.billerickson.net
NOTE: To better serve my clients, partners, and most importantly my family,
I've begun checking email only three times per day.
For phone calls, please schedule here: http://tungle.me/billerickson . If
it's an emergency, please call now and leave a voicemail
On Mon, Jul 2, 2012 at 2:26 AM, Fabien Quatravaux <
fabien.quatravaux at 1nterval.com> wrote:
> Hi Diana
> I have the same request : I often use custom image sizes for my theme, and
> those custom sizes are only seldom used. But, as far as I know, there is no
> option to specify an image size only for featured images.
>
> Instead of having each size created for each uploaded image, wouldn't it
> be more clever to create the image only the first time it is needed ? I
> mean, have a hook in wp_get_attachment_image_src and create the image here
> if it does not already exists ?
>
> Fabien
>
> Le 01/07/2012 14:00, wp-hackers-request at lists.**automattic.com<wp-hackers-request at lists.automattic.com>a écrit :
>
>> ------------------------------**------------------------------**
>> ----------
>>
>> Message: 1
>> Date: Sat, 30 Jun 2012 22:33:07 -0300
>> From: "Diana K. C" <dianakac at gmail.com>
>> Subject: [wp-hackers] Thumbnail creation question
>> To: <wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>>
>> Message-ID: <005b01cd5729$79cf0b20$**2200a8c0 at TITA>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> I need to add an image size (I know there is add_image_size), but Is
>> there someway to prevent the new size be used for all images sent?
>>
>> I would like to have an image size for only the Featured image, not all
>> images I send, thus saving some server space.
>>
>> ------------------------------
>>
>>
> --
>
> *Fabien Quatravaux*
> Développeur
> LD : 06 20 20 54 97
>
> logo <http://www.1nterval.com/> *Interval*
> /Métiers d'art digital/
> www.1nterval.com <http://www.1nterval.com/>
>
> Afin de contribuer au respect de l'environnement,
> merci de n'imprimer ce courriel que si nécessaire.
>
>
>
>
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>
More information about the wp-hackers
mailing list