syamilmj / Aqua-Resizer

Resize WordPress images on the fly
502 stars 205 forks source link

URL image source problem #29

Open Itachicz11 opened 11 years ago

Itachicz11 commented 11 years ago

Hello,

In my localhost WP theme I have this line of code

<?php $image = aq_resize( "http://dingo.daweb.cz/wp-content/uploads/2013/05/photo111.jpg", $image_width, $image_height, true ); ?>

It doesn't create any link. It seems that the problem is that the source image isn't on the same url as aqua_resizer script.

Thank you for this great script.

senlin commented 11 years ago

usually you don't reference the file directly, but instead do something like

 $image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id() ,'full' ), 300, 300, true );
Itachicz11 commented 11 years ago

there is the problem that it's dynamic url from other side but nevermind It's not problem now