ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dynamically pulling dimensions

November 23, 2011 3:49am

Subscribe [2]
  • #1 / Nov 23, 2011 3:49am

    Liam Crean

    121 posts

    Hi - I have the need to generate an image’s width and height from the DB.

    Anyone done or heard of this before?

    The jQuery used in the front-end requires this to properly format a grid of images. I will know the width of the image inside the grid, but pulling the height is critical.

    Unfortunately I cannot leave this to the client to add - if I could I’d use matrix fields.

    Thanks, Liam

  • #2 / Nov 23, 2011 4:31am

    Liam Crean

    121 posts

    Amazing what we can accomplish through a good nights sleep… should have thought before I posted here. This was killing me last night. Tried all manner of CSS configurations to get the items to float properly inside ‘masonry’ js.

    But the Imgsizer Plugin does a perfect job without needing to change HTML/CSS at all.

    It generates automatically generates a matching height from a known width. Proportionately Perfect.

  • #3 / Nov 23, 2011 12:29pm

    Kyle Cotter

    730 posts

    Glad you were able to find a solution Liam.

    If you have any more questions, feel free to post again.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases