Closed (duplicate)
Project:
Inline
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 May 2006 at 01:59 UTC
Updated:
2 Mar 2007 at 19:13 UTC
Jump to comment: Most recent file
Comments
Comment #1
Bèr Kessels commentedyou can change the sizes under configuration.
Comment #2
stmind commentedThanks Ber, but I think perhaps you misinterpreted my question.
I'm pretty sure that in the last version of inline.module that I was using, large images, say 640x480, would be displayed, but with CSS specifiying the width at whatever the admin specified as inline.module's max width, say 200x200.
The result was displaying all images in the article, and large images would get sized to fit by the browser.
Certainly the browser does a poor job of sizing images, but knowing that limitation I still prefered to attach images to posts in this manner.
Now with the latest CVS commits, that feature is gone, and any images that are larger than the max size setting are simply linked as hrefs, not shown as images.
SO.....
Last night I worked on the code, and got this functionailty working nicely. There is a new boolean setting in the settings page for "Show large images inline", defaulting to off, and turning it on will allow the functionality I describe. The added code is fairly minimal. I will post a patch later.
It's running on my site now, see the first article at http://www.mindling.com
Thanks.
Comment #3
Bèr Kessels commentedI think that looking for a string 'unlimited' or a bool FALSE or a value of NULL or even '' might be a better option.
The help text with that would be:
"set the maximum size, for example 400x300, or give 'unlimted' if you wish not to use this feature."
Sounds reasonable to me.
Comment #4
sunI'd like to propose that separating fields for width and height would give the opportunity to automatically display inline images based either on width or height. This would allow more flexible layouts. If a user enters '0' or nothing in one of those fields, this should be handled like 'unlimited'. - Writing "unlimited" rather sounds like fun to me...
Comment #5
Bèr Kessels commentedSee #4 for a description of this feature.
Comment #6
sun@stmind: If you want to display all images, disregarding their dimensions, just set up maximum dimensions that can't be exceeded, e.g.
99999,99999. This will display all images inline.As long as Inline does not support image resizing I doubt that this feature will be implemented.
Comment #7
stmind commentedCSS does the resizing if the image is larger than the limit.
I'm sorry I got side-tracked and haven't posted my patch. Attached is a patch, however it was made against v 1.12, so I need to compare it to the current version.
Comment #8
stmind commentedOk, I updated my patch against the latest Inline.module 1.19.2.3 for Drupal 5.1. (Please ignore the above patch) I tested it in a fresh install of Drupal 5.1, and it works great.
To summarize, this patch allows the admin to choose how oversize images are displayed, using a new configuration option called "Oversize Image Handling"
The admin specifies a maximum image size just as they do now. Then, if an image is larger than the maximum dimensions specified, in either dimension, the admin can specify one of two options in "Oversize Image Handling":
Here is a screenshot of the admin page
Please see the attached patch.
Comment #9
stmind commentedAnd here's the patch in action. I have max size set to 300 x 300.
Comment #10
sunJust curious... why didn't you just apply the attributes
max-widthandmax-heightforimg.inlinein your theme CSS combined with the method explained in #6 to get the same results?Comment #11
stmind commentedGood question. :)
A couple of reasons:
a) Max-width in IE requires an ugly (IMO) hack.
b) This way it's a module feature, and therefore all themes are blessed with it. New themes won't break and don't need hacking before use.
Comment #12
sunPatch is not against latest HEAD and seems to need a bit of rewording.
I'll wait for Richard's or Bèr's opinion about this feature implementation.
Comment #13
Richard Archer commentedMy opinion?
There hasn't been any positive feedback from other users. Usually a couple of people post up a +1 if they like the concept.
It also complicates the admin interface, which I think is pretty hard to understand already.
Since there is already a (hacky) way of doing this with CSS, I'm not too keen on this patch. But if it generates some positive feedback and the admin interface can be streamlined a bit then maybe...
Comment #14
sunMarking as duplicate of http://drupal.org/node/120092
CSS-resized images aren't very useful. Really resized images are.
Comment #15
stmind commentedAgreed, the linked issue is the better approach.