Page 1 of 1

[serendipity_event_imageselectorplus] wrong size for thumbs

Posted: Fri Nov 02, 2012 9:48 am
by bernd_d
landscape-thumbnails of gallery seems not to get correct width/height...
screenshot of output.png
screenshot of output.png (136.89 KiB) Viewed 7884 times
Settings:
version: 0.32
Maximum height of thumbnail (discards width) is on "150", width is on "0"
Dynamically resize images based on width and height attributes is set to "No"

The thumbnail-images in media-database are all on 150px height.

This is the output of html...

Code: Select all

<div class="serendipity_mediainsert_gallery">
  <div class="serendipity_imageComment_left" style="width: 100px">
      <div class="serendipity_imageComment_img">
      <a rel="prettyPhoto" class="serendipity_image_link" href="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020601.JPG" title="">
        <!-- s9ymdb:795 -->
        <img width="100" height="150" src="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020601.serendipityThumb.JPG">
      </a>
      </div>
      <div class="serendipity_imageComment_txt">P1020601</div>
  </div>
  <div class="serendipity_imageComment_left" style="width: 150px">
      <div class="serendipity_imageComment_img">
      <a rel="prettyPhoto" class="serendipity_image_link" href="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020604.JPG" title="">
        <!-- s9ymdb:795 -->
        <img width="150" height="100" src="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020604.serendipityThumb.JPG">
      </a>
      </div>
      <div class="serendipity_imageComment_txt">P1020604</div>
  </div>
  <div class="serendipity_imageComment_left" style="width: 150px">
      <div class="serendipity_imageComment_img">
      <a rel="prettyPhoto" class="serendipity_image_link" href="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020605.JPG" title="">
        <!-- s9ymdb:795 -->
        <img width="150" height="100" src="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020605.serendipityThumb.JPG">
      </a>
      </div>
      <div class="serendipity_imageComment_txt">P1020605</div>
  </div>
  <div class="serendipity_imageComment_left" style="width: 100px">
      <div class="serendipity_imageComment_img">
      <a rel="prettyPhoto" class="serendipity_image_link" href="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020606.JPG" title="">
        <!-- s9ymdb:795 -->
        <img width="100" height="150" src="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020606.serendipityThumb.JPG">
      </a>
      </div>
      <div class="serendipity_imageComment_txt">P1020606</div>
  </div>
  <div class="serendipity_imageComment_left" style="width: 150px">
      <div class="serendipity_imageComment_img">
      <a rel="prettyPhoto" class="serendipity_image_link" href="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020607.JPG" title="">
        <!-- s9ymdb:795 -->
        <img width="150" height="100" src="/uploads/Urlaub/2012-08-Berlin/Charlottenburg/P1020607.serendipityThumb.JPG">
      </a>
      </div>
      <div class="serendipity_imageComment_txt">P1020607</div>
  </div>
</div>
As you can see, something is running wild with height- and width-attributs on landscape-images.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Sun Nov 04, 2012 8:34 am
by bernd_d
Ok, i think i can specify the problem. It seems, the wrong output is only generated within entry-preview. Output after publishing looks good.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Sun Nov 04, 2012 2:44 pm
by onli
That is odd. Isn't the resizing done there on the same codepath and with the css of the template?

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Sun Nov 04, 2012 5:19 pm
by bernd_d
I'll try it tomorrow again, then we will see.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Mon Nov 05, 2012 9:21 am
by bernd_d
I think i got it...

Preview uses plugin_mediainsert.tpl from plugin-directory for generating the gallery-code but frontend-output (template 2k11) ignores this file.

Don't know if backend or template is going wrong in this case.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Tue Nov 06, 2012 3:38 pm
by bernd_d
I'm getting crazy...now it is shown wrong in frontend too. :shock:

And yes...template_c and browser cache has been cleaned up before.

Seems, i have to run some tests again.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Tue Nov 06, 2012 9:30 pm
by Don Chambers
bernd_d wrote:I'm getting crazy...now it is shown wrong in frontend too. :shock:
Looks fine to me. Have you cleared your browser's cache?

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Wed Nov 07, 2012 6:37 am
by bernd_d
Don Chambers wrote:Looks fine to me.
Really? For me, it looks like in following screenshot...
2012-11-07 07 23 08.jpg
2012-11-07 07 23 08.jpg (77.93 KiB) Viewed 7824 times
The images with red arrow are wrong. jpg-thumbnail has an height of 150px, but img-tag sets other sizes.
Don Chambers wrote:Have you cleared your browser's cache?
I can't count anymore, how often i did this ;)

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Wed Nov 07, 2012 8:16 am
by Timbalu
This is landscape size.
The images will be automatically set to width: 150 in landscape and height: 150 in portrait size, IMHO.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Wed Nov 07, 2012 9:02 am
by bernd_d
I think, this is wrong. The img-tag should use the max-height-settings (all jpg-thumbs have an height of 150px). There is no reason for me, why landscape-images are resized to 100px instead of 150px.

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Wed Nov 07, 2012 11:15 am
by Timbalu
I can't really answer to this, as I cannot dig into this further for lack of time.
But I had something congeneric in this thread http://board.s9y.org/viewtopic.php?f=10&t=18967

Re: [serendipity_event_imageselectorplus] wrong size for thu

Posted: Wed Nov 07, 2012 3:36 pm
by bernd_d
I have removed all height/wide-tags from tpl now. Works at the moment, don't know where the problem exactly is/was.