I'd like larger images to be shown (reduced to the size specificied by css only) and linked to the full image. This used to be the case with this module, but now I see it's not. Why the change? Is an option for this planned? How can I help?

Thanks

CommentFileSizeAuthor
#8 inline-resize-1.19.patch3.47 KBstmind
#7 inline-resize.patch2.8 KBstmind

Comments

Bèr Kessels’s picture

Category: feature » support
Priority: Normal » Minor

you can change the sizes under configuration.

stmind’s picture

Category: support » feature
Priority: Minor » Normal

Thanks 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.

Bèr Kessels’s picture

I 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.

sun’s picture

I'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...

Bèr Kessels’s picture

Title: Images not displaying, why the change? » Image size limits based on height OR width OR both.

See #4 for a description of this feature.

sun’s picture

Status: Active » Closed (won't fix)

@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.

stmind’s picture

Status: Closed (won't fix) » Needs work
StatusFileSize
new2.8 KB

CSS 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.

stmind’s picture

Title: Image size limits based on height OR width OR both. » Inline display of oversize images (resized with CSS)
Status: Needs work » Needs review
StatusFileSize
new3.47 KB

Ok, 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":

  1. Text link: A text link is displayed. This is the current module behavior, and is still the default.
  2. Show resized image inline: The image is displayed inline, but CSS is used to resize the image to the maximum dimension.

Here is a screenshot of the admin page

Please see the attached patch.

stmind’s picture

And here's the patch in action. I have max size set to 300 x 300.

sun’s picture

Title: Inline display of oversize images (resized with CSS) » Display CSS-resized images that exceed maximum size

Just curious... why didn't you just apply the attributes max-width and max-height for img.inline in your theme CSS combined with the method explained in #6 to get the same results?

stmind’s picture

Good 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.

sun’s picture

Patch 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.

Richard Archer’s picture

My 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...

sun’s picture

Status: Needs review » Closed (duplicate)

Marking as duplicate of http://drupal.org/node/120092
CSS-resized images aren't very useful. Really resized images are.

stmind’s picture

Agreed, the linked issue is the better approach.