Ciao a tutti, avrei la necessita’ di forzare la creazione di un formato per una slide che utlilizzo.
Da quel che ho notato per default wp non crea il formato se l’immagine e’ inferiore alle dimensioni richieste per il formato.
Per recuperare poi l’immagine uso
Code:
$immagine = wp_get_attachment_image_src($attachments[0]->ID,’FORMATO’);
//FORMATO e’ il nome scelto
Se lo trova bene, altrimenti un immagine di defautl.
Come posso forzare la creazione?
O come posso prendere l’immagine di default se il formato non esiste? nel secondo caso devo per forza rifare la query?
Per il formato ho aggiunto in function.php
add_image_size( ‘FORMATO’, 625, 280, true );
grazie