acrylian / zp_picturefill

A Zenphoto plugin for responsive images
GNU General Public License v3.0
0 stars 1 forks source link

Mistake with HD Thumb #5

Closed Bruno21 closed 10 years ago

Bruno21 commented 10 years ago

The first thumb (SD and HD) have good size. The 2nd thumb have a 2x size The third thumb have a 4x size ...

In function getHDImageThumb(), after

setOption('thumb_size', $thumbsize * 2, false);
$img_hd = $imgobj->getThumb();

I think we need to come back to old setting:

    setOption('thumb_crop_width', $cropw, false);
    setOption('thumb_crop_height', $croph, false);
    setOption('thumb_size', $thumbsize, false);

And for line 144

$html .= '<img srcset="' . $standard_source . '" alt="' . $alt . '">';

I think we definitively need the width and height attributes...

acrylian commented 10 years ago

Good find. Although the options are set temporarily it means "run time" so on following thumbs it is indeed wrong. Same for the image/thumb quality options actually. I really appeciate your testing. Glad that anyone actually wants to use this!

I will look into the width/height attributes. That will require some internal changes.