[serendipity_event_imageselectorplus] wrong size for thumbs

Found a bug? Tell us!!
Post Reply
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

[serendipity_event_imageselectorplus] wrong size for thumbs

Post by bernd_d » Fri Nov 02, 2012 9:48 am

landscape-thumbnails of gallery seems not to get correct width/height...
screenshot of output.png
screenshot of output.png (136.89 KiB) Viewed 3817 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.

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Sun Nov 04, 2012 8:34 am

Ok, i think i can specify the problem. It seems, the wrong output is only generated within entry-preview. Output after publishing looks good.

User avatar
onli
Regular
Posts: 2361
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by onli » Sun Nov 04, 2012 2:44 pm

That is odd. Isn't the resizing done there on the same codepath and with the css of the template?

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Sun Nov 04, 2012 5:19 pm

I'll try it tomorrow again, then we will see.

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Mon Nov 05, 2012 9:21 am

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.

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Tue Nov 06, 2012 3:38 pm

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.

User avatar
Don Chambers
Regular
Posts: 3638
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by Don Chambers » Tue Nov 06, 2012 9:30 pm

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?

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Wed Nov 07, 2012 6:37 am

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 3757 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 ;)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by Timbalu » Wed Nov 07, 2012 8:16 am

This is landscape size.
The images will be automatically set to width: 150 in landscape and height: 150 in portrait size, IMHO.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Wed Nov 07, 2012 9:02 am

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.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by Timbalu » Wed Nov 07, 2012 11:15 am

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
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [serendipity_event_imageselectorplus] wrong size for thu

Post by bernd_d » Wed Nov 07, 2012 3:36 pm

I have removed all height/wide-tags from tpl now. Works at the moment, don't know where the problem exactly is/was.

Post Reply