continue;
}
$type = explode('/', $umatch[1]);
- $thumbsize = false;
- $new_thumbsize = false;
+ $thumbsize = -1;
+ $new_thumbsize = -1;
if (count($type) > 2 && $type[1] == 'Thumb') {
$thumbsize = $type[2];
+ $provider = 'Images/Thumb';
+ } else {
+ $provider = $type;
}
if (!empty($attr['width']) || !empty($attr['height']) )
if (!$new_thumbsize) {
$type = array('Image');
} else {
+
$type = array('Image', 'Thumb', $new_thumbsize);
$fc = $img->toFileConvert();
}
+ // finally replace the original TAG with the new version..
+ $old_src_tag = 'src="'. $attr[src] . '"';
+ $img = str_replace(
+ 'src="'. $attr[src] . '"',
+ $img->URL($new_thumbsize , $provider, $baseURL=false)
+ 'src="'. $baseURL + implode('/', $type) . '/' . urlencode($img->filename)"',
+
+
+
// make an image url..