LovelessDesign
says
I know that this syntax works
But I’m using aq_resize and I want to show a default image, if there is no thumbnail and resize it.
Can you tell me why it doesn’t work?
It might be a syntax error in the first line because
<img src="<?php echo get_bloginfo('template_directory'); ?>/images/noimage.png" />
But I’m using aq_resize and I want to show a default image, if there is no thumbnail and resize it.
if( $thumbnail_url == '' ) { $thumbnail_url = get_bloginfo('template_directory').'/images/noimage.png'; }
$image = aq_resize( $thumbnail_url,$imgwidth,$imgheight,true );
echo '<img src="'.$image.'" alt="" />';
Can you tell me why it doesn’t work?
It might be a syntax error in the first line because
<img src="<?php $thumbnail_url ?>" />
also doesn’t work.
LovelessDesign
says
Anybody knows why this line doesn’t work? The variable is empty, when echoing.
$thumbnail_url = get_bloginfo('template_directory').'/images/noimage.png';
1707 posts
YOU TOUCH IT YOU BUY IT
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Referred between 50 and 99 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 250 000 and 1 000 000 dollars
freshface
says
Hi!
it’s because aqua resizer script can resize only images located in /wp-uploads/ folder. But, there is a magic solution :)) You can use our image resizing script, which is able to resize images located everywhere 
cheers, freshface
LovelessDesign
says
oh no. changing every resizing code for the third time in my theme
haha thanks for the answer
