Hi,

first thank you for the great module!

I've a small problem: I wanted to create a css-class - for example "standard_image" - which is defined with a width of 300px. The problem is: If I load a image via IMCE in TinyMCE the original image size is automatically filled in the TinyMCE dimension dialog fields. If I now add my class, the picture is shown in the right properties, but only by resizing on the screen not by using Image Resize Filter. That's also why it will not be connected with the lightbox.

If I change the size in the TinyMCE dimension dialog fields everything works fine and the Resize Image Filter creates the new pictures.

Any idea how to fix the issue? Thanks a lot for support.
Filburt

Comments

quicksketch’s picture

I'm not sure there's an adequate way to accomplish what you're describing. Image Resize Filter works by reading the HTML and then resizing the image based on the HTML's image tag dimensions. It doesn't have any knowledge of the CSS on the page at all, nor would it be possible to get this information reliably, since the filtering system is run much earlier in the page load than the CSS added by the theme.

It could be possible to specify a list of "special classes" that have matching height/width properties, but I don't think the options would be very useful to the majority of sites, plus they'd get out of date if the CSS was modified.

Rather than taking this approach, I'd suggest looking into ways that you might be able to set the height and width properties on the image instead of using a class. You might take a look at the tinyMCE plugin for advanced scale: http://code.google.com/p/tinymce-plugin-advimagescale/wiki/Usage

filburt’s picture

Thank you Quicksketch for the fast reply. Unfortunatelly this plugin for TinyMCE doesn't fit my needs.

But do you know by chance if there is a possibility to replace the width/height fields in TinyMCE with standard widths/heights for example as radiobuttons like 'standard image size', 'thumbnail image size' etc.?
What I would need is a small number of pre-defined image sizes. I've already searched for such a plugin for TinyMCE but haven't found an adequate solution yet.

Thanks a lot, Filburt

quicksketch’s picture

I'm not sure what solutions are available, but either way the solution probably needs to be handled at the WYSIWYG editor level, not in Image Resize Filter. See my reasoning in the won't fixed issue #433116: Maximum width.

quicksketch’s picture

Status: Active » Closed (won't fix)

Moving to won't fix since this isn't best handled at the filter level.

filburt’s picture

Status: Closed (won't fix) » Active

I reopended this thread because I thought further how to bring standard image sizes together with the image resize filter modul...

One idea: If I use IMCE with a standard thumbnail size (for example 320px x 240px), add a sufix with IMCE like image resize filter does (-320x240) and save the original file and the thumbnail file in the directory ../files/resize/images than I could get standard thumbnail pictures with a lightbox link (because it is a great option in the image resize filter modul). And it doesn't collapse with the possibility to change the image size in the wysiwyg-editor.

I tried it but it doesn't work yet. Would there be any possibility to bring together IMCE and image resize filter as described above? I think it would cover the needs of some people here...

Thanks a lot and greetings
Filburt

quicksketch’s picture

You shouldn't ever use the "resize" directory for any kind of image storage, other than what image resize filter does for you automatically. The images in that directory are considered completely temporary, and may be deleted at any time, without warning or notice. Image Resize Filter generates images on the fly as needed, so even deleting the entire directory (as database updates may require) doesn't have any negative effect and is a good way to clean up abandoned files (note that the Drupal cache must be cleared also).

So other than the misuse of the resize directory, I don't think doing what you've described will work at all. If you create a new image and then scale it with IMCE, then insert it into the textarea, the Image Resize Filter won't do *anything* at all, because now the image isn't being resized by the user (the HTML height/width match the actual file height/width). If the user were to resize the image in the WYSIWYG after inserting a thumbnail size, you'd end up with a file like resize/resize/images/example-320-240-160-120.jpg, which is just super confusing.

Anyway, the bottom line: don't use the "resize" directory for ANY reason. It's for Image Resize Filter's use only and it would be best if it weren't shown at all within IMCE.

filburt’s picture

Ok, I see your point. But it's really a pitty that there is no handy possibility for standard thumbnail sizes in combination with wysiwyg editors and image resize filter.

However, thank you for the fast reply!
Greetings Filburt

quicksketch’s picture

Status: Active » Closed (won't fix)

Yep, but the problem is not within the scope of this module. It's for the WYSIWYG editor to provide.