syamilmj / Aqua-Resizer

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

External URL #93

Open Bluxart opened 8 years ago

Bluxart commented 8 years ago

Hi, but Aqua Resizer don't work with an external URL image?

menshinobi commented 8 years ago

It should work with external URL image. Do you have a PHPFiddle?

Bluxart commented 7 years ago

Nope but it is a simple code:

The first var $ext_url_output, the output is empty. The second var $local_url_output, the output is correct.

I make this test in my local test, but the problem is present also in a live server.


$external_domain_img_url = 'http://demo-themes.alessioatzeni.com/valkyrie/wp-content/uploads/2016/09/ui_01.jpg';
$local_domain_img_url = 'http://localhost/test_demo/wp-content/uploads/2016/12/ui_01.jpg';

$ext_url_output = aq_resize( $external_domain_img_url, 500, 500, true, false, true );
$local_url_output = aq_resize( $local_domain_img_url, 500, 500, true, false, true );

echo '<img src="' . esc_url( $ext_url_output[0] ) . '" width="' . esc_attr( $ext_url_output[1] ) . '" height="' . esc_attr( $ext_url_output[2] ) . '" />';
echo '<img src="' . esc_url( $local_url_output[0] ) . '" width="' . esc_attr( $local_url_output[1] ) . '" height="' . esc_attr( $local_url_output[2] ) . '" />';
awps commented 7 years ago

External images are not supported by Aqua Resizer for several reasons.

ShpendBerisha commented 6 years ago

I created the same issue some minutes ago but now I just saw this topic here. @awps its sad to hear that it doesn't support that because many people in wordpress are using custom fields for example tube sites with video grabbers that includes external image urls via custom fields.

If you can add support for that would be great!Thankyou.