I tried this ++ module and it didn't work, I tested it on a new drupal setup and, it worked.

Searching for the cause I saw that wysiwyg with CKEditor changed the path of the img scr change to a relative path: ../../files/yy. Inserting an image in plain text the script has an absolute path to the image (http://www.website.files/yy) and made the module work.

I Use wysiwyg with FKEditor, Imagefield, Imce and insert. Is this a bug (the filter doesn't recognise the relative path), or can I change the setup to resolve this, how?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cmseasy’s picture

Deep in the insert.module on line 349 I found a solution:
// This variable has no configuration location. It may be set by placing
// $conf['insert_absolute_paths'] = FALSE;
// in the site settings.php file, or by manually running variable_set().
// For reasons why this might not do what you want and why there's no UI
// see http://drupal.org/node/640352.
I placed the $conf in settings.php, it worked.

I dont't know if this is an project insert issue or an image resize issue. I wil post a link in the insert project issues, pointing here.
May be both maintainers can make contact with each other, and make a nice solution for making insert working with image resize. .

quicksketch’s picture

Category: bug » feature
Priority: Critical » Normal
Status: Active » Postponed

I'm actually the maintainer for both modules.

Unfortunately it is literally impossible for Image Resize Filter to work with relative paths. Because the same content may be shown in different places, relative paths do not work with Image Resize Filter (or really, with Drupal as a whole). I'm moving this issue to postponed for other users that have this same problem, but there is nothing that can be done to Image Resize Filter to make this possible.

Danny_Joris’s picture

I have the same issue here. It works fine when using IMCE because imce inserts images as /sites/default/files/image.jpg , while the insert (or wysiwyg?) module inserts images as ../../sites/default/files/image.jpg which does not work.

I don't really see the reason behind outputting an image with a ../../ prefix..

Edit: This seems to be the cause: #905032: All images are inserting with relative paths (i.e. ../../files/example.png) It worked well in Chrome (although in Chrome there weren't any image resize handlers available)

philbar’s picture

Status: Postponed » Active

I can confirm this problem. I simple switched back to fixed path and it works now.

philbar’s picture

Category: feature » bug

Note - it did give attempt to resize my images, but was unsuccessful. Definitely broken. At least ignore relative path.

quicksketch’s picture

Title: Not working with relative path » Ignore relative paths (that cause Image Resize Filter to fail)
Status: Active » Fixed
FileSize
737 bytes

Looks like it already doesn't work with relative paths unless they start with a dot, not sure why I ever thought starting with a dot would work adequately. Image Resize Filter looks like it's been this way since the original version.

Committed this patch to D6 and D7 versions.

quicksketch’s picture

A followup patch, since we skip images immediately if they start with a dot (or really any character but a slash), we can also remove the IF statement a few lines after the removed check from the first patch. This patch also committed.

topdawg’s picture

I can't get this module to work. I see the type cursor I beam and no handlebars on images. The image turns blue when selected but that's it. Appreciate tips.

quicksketch’s picture

This module does not provide WYSIWYGs or ways to resize images, it just creates the properly sized image when viewing the node (it doesn't affect the edit form in any way). It's a known issue that Safari does not get resize handles in many WYSIWYGs, I suggest checking with the WYSIWYG library you are using (CKeditor, FCKeditor, tinyMCE, etc).

topdawg’s picture

I got it working - it was permissions (what else?)

Ensured SU PHP is on so I can set 755 as write.
Set the permissions on the resize and tmp folders and where I could thing of images being stored also to 755.

I got handles, I got advanced image for css options, and yes I'm using both TinyMCE and FCKeditor, at this point to compare which would work. All optioned by wysiwyg.

Joe

el_reverend’s picture

I have noticed that the latest version of Safari, Chromium, etc. do NOT get the resize handles in order to resize the image provided. I have tested it in Firefox and the handles do show up. One thing I currently see is that the alignment set in CKEditor (in my case) do not translate into the theme. No classes or styles where modified upon saving the content type, wo the theme does not float or restyle the image. Is there a way to include the resize handles in CKEditor or ensure that is saves classes to the [img] tag?

Thanks.

quicksketch’s picture

Please stop asking questions about your WYSIWYG here. Ask the authors of the WYSIWYG library you are using.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.