syamilmj / Aqua-Resizer

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

Not resizing get_post_gallery_images() #37

Closed jaredrethman closed 11 years ago

jaredrethman commented 11 years ago

Hi there,

Awesome plugin - could shoot myself as I just discovered it.

I'm having a issue with resizing images retrieved from a post gallery. I'm not sure if this is an issue with aq_resizer or my wordpress skills (lack there of). The URL's are output as aq_resizer requires, but as soon as I pass $image through the aq_resize function it outputs nothing.

Below is my code:

$gallery = get_post_gallery_images();
$image_list = '<ul>';

// Loop through each image in each gallery
foreach( $gallery as $image ) {
    $imagethumb = aq_resize($image, 75, 75, true);
$image_list .= '<li><img src="' . $image . '"/></li>';
}

$image_list .= '</ul>';
$content .= $image_list;

echo $content;

Any help would be appreciated, thanks in advance.

mxmzb commented 11 years ago

As long as I can see from your snippet $attachment_url is not defined at all at this point.