Project:Image Assist
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

When trying to insert an image that I have uploaded, I can choose the image from the listing but no matter what size I set the image to be in the "Add image" pop-up window, the code it inserts into the textarea is always the thumbnail file and the thumbnail dimensions. I can manually change the code to get a different sized image, but its really annoying.

Comments

#1

Wierd. Can you please try the 5.x-dev version and see if that works?

#2

I have similar problems here - with the developer version.

Some of my images just disappeared (i.e. they are still in the image directory, but the node is empty and does not show the image any more - I had to upload it anew). Some images are only displayed as thumbnails, choosing any other image size does lead to the image not being displayed. If I choose "Preview" as the image format then the size of the image that is copied into the node body is "width=0|height="

Manually changing that leads to either nothing being displayed at all or the image as thumbnail - aligned to the left, not matter which alignment is set.

#3

Priority:normal» critical

I have similar problems here - with the developer version.

Some of my images just disappeared (i.e. they are still in the image directory, but the node is empty and does not show the image any more - I had to upload it anew). Some images are only displayed as thumbnails, choosing any other image size does lead to the image not being displayed. If I choose "Preview" as the image format then the size of the image that is copied into the node body is "width=0|height="

Manually changing that leads to either nothing being displayed at all or the image as thumbnail - aligned to the left, not matter which alignment is set.

#4

Sorry for the doubled posting...
This seems to me to be related to http://drupal.org/node/168180

#5

Version:5.x-1.4» 5.x-1.x-dev
Category:bug report» support request

When you say that images disappear, do you mean that the image nodes themselves don't show any images, or that the nodes where you have insterted images don't show them any more?

You say that some images only show thumbnail sizes. Do the others work as expected? Do the broken images have something in common, such as size, image, filename or something else?

Please verify that the image nodes have all their sizes available. If not, you're having a issues with the Image module, not Image assist.

#6

I know, the description is a bit vague, but I have struggled to find similarities - and there are none. I had images disappearing that were jpg, gif and png, some larger then the default size set for my site, some smaller. Disappearing meant two things:
- some image nodes were empty, but the image itself was sitting peacefully in the files directory
- some "text" nodes did not show images despite the image assist code being present

Some of this may have been caused by me using incompatible versions of image assist and image. I have updated both to the latest dev versions and have regenerated the images that were lost from the image nodes (these did indeed not have thumbnails etc. generated). So that part is fixed.

I still have a problem with using image assist to display some of the images in other nodes. There is for instance an image with the size of 1024x683. Image module has created a thumbnail and preview with the proper sizes. Unfortunately, if I use image assist to display the preview (640x427) only the thumbnail is show. If I manually enter the correct size, nothing is shown at all (apart from the caption). The only thing that works is to have the image size 1 pixel larger or smaller than the preview, i.e. 640x426 pixel.

Any ideas?

#7

Version:5.x-1.x-dev» 5.x-1.4

Hello. I am having exactly the same problem (I think) with img_assist. I am able to upload images properly, and my thumbnails and custom size are generated automatically (so, seemingly no problem with the image module). When I try to post an inline image, I can select the image effectively, but no matter which size I choose to insert, it is always the thumbnail size that appears in the post. This is confirmed if I "View Source" in a browser: the image filename in the HTML source code is filename.thumbnail.jpg. I have tried manually adjusting the "width" and/or "height" values in the generated tag code, but I still get the thumbnail image displayed, even if I completely remove the width and height tags. Img_assist seems somehow to eventually be substituting in the filename for the thumbnail image regardless of what image size was chosen when selecting the image. Any ideas on how to rectify this? Cheers :) James

#8

I too am having this irritating problem. It is exactly as jamoo1980 has specified in their post above.

#9

Title:Thumnail image file and dimentions always displayed when inserting image» Images are always inserted in thumbnail size
Category:support request» bug report

Could you please test the latest development snapshot of Image Assist and follow-up here if you still encounter this bug?

#10

Please check if this has something to do with the access advanced options permission.

Just found this comment in img_assist_tinymce.js:

<?php
   
// When editing the properties of an image placed with
    // img_assist, it's not easy to figure out what standard
    // size was used.  Until such code is written we will
    // just set the size to "other".  Of course, if custom
    // isn't an option then I guess the image size will default
    // back to thumbnail.
   
formObj['edit-size-label'].value = "other";
   
formObj['edit-width'].value  = width;
   
formObj['edit-height'].value = height;
?>

#11

I tested the new code, no joy though as the image is still placed as a thumbnail. I don't think it is to do with permissions as I am testing this as the admin user. I also activated the access advanced options permission for a role to test this but the thumbnail is always displayed.

These are the steps I am taking to insert an image:
1. Created a new image size and set as default
2. Create a new page and use image_assist from TinyMCE to upload or select an existing image
3. Insert new image using preset size defined in step 1
4. Image is inserted as thumbnail size although different size was chosen
5. Examine code reveals: src="/files/images/DSCF0945_1.thumbnail.JPG"

#12

I'm still getting this issue with the latest updates. Is anyone working on this issue? Do they need some help or more information about the problem?

#13

Version:5.x-1.4» 5.x-1.x-dev
Priority:critical» normal
Status:active» postponed (maintainer needs more info)

Did you really test with the latest development snapshot? I was not able to reproduce this bug, even not after limiting access permissions for Image Assist/TinyMCE of a test user, disabling Image Assist's derivative image size creation options in settings, creating multiple custom derivative sizes, aso.
The filter tag always contains the selected image size, no matter which size I select.

#14

Hi,

I wasn't able to reproduce the steps in #11.

@Tanc
Could you post the html source of the image assist TinyMCE popup when editing a faulty image? Would be interesting to see what the actual form values are that lead to the bad filter code.

#15

@sun
Yep, definitely the latest version, Dev from the 28th of September. Thanks for looking into this.

@smk-ka
I've attached the form section of the html to the message. Let me know if you need anything else.

AttachmentSize
formImageAssist.txt 4 KB

#16

@smk-ka: Great idea!

I think, the empty height might be the cause:

<option selected="selected" value="500x">Horseshoes Images</option>

#17

AFAIK an empty height simply means the width is the controlling factor (ie. there is no restriction on the height). Could it be that this (image related) feature is just not implemented in Image Assist?

#18

This was my understanding too. The reason I left the height out was so that images would be scaling to fit a specified maximum width but could be any height. I will try with the height attribute entered and post the result.

#19

I can't seem to get this to work properly. The user I'm testing with is the Admin user, who also has another role assigned which has the full privileges of the img_assist module (all boxes ticked). I can insert Preview sized images (one of the defaults) but my own defaults don't work and are always inserted as thumbnails.

I tried specifying a height as well as a width but this didn't make any difference. Is there anything else I could try?

#20

Title:Images are always inserted in thumbnail size» Solution?
Priority:normal» critical

I think i have a solution for that - I had the same problem.
Just go to admin/settings/image and dont just give a max-value for the width, but also for the height...

Dont know why, but now you can use your own settings in image-assist and IT WILL generate the right code for the image.

#21

Title:Solution?» Images are always inserted in thumbnail size
Priority:critical» normal

I'm resetting the title so that people are able to track this issue. Also, I don't think this issue is critical. However, if leaving out either the height or width in the Image settings is a supported feature of Image, then Image assist should support this too. Which makes this a bug. Who wants to work on a patch?

#22

Title:Images are always inserted in thumbnail size» Missing height in img_assist tags

#23

I'm also experiencing this problem. The final tag always shows |width=0|height=] and the image gets displayed in thumbnail version, no matter what size you choose.

For what I understood, your options are:
a) to set a max-value for the height in Image module settings and not just for the width;
b) to manually change the width value in the final tag on the node.

In the first option (which I didn't even try) you'll almost certainly get distorted images (because the with vs height ratio will be wrong in most images).

In the second option (which I did try) you'll get a distorted image if you try to insert a size bigger than the thumbnail size (for obvious reasons).

So, how could I use this module on a production site? Isn't this a critical issue? Actually, how can anyone use this module? I must be missing something here...

#24

In the first option (which I didn't even try) you'll almost certainly get distorted images (because the with vs height ratio will be wrong in most images).

No. The height and width represent the outer bounds of the derivative images. If the proportions of a particular image doesn't match your size setting then either the width or height will be smaller than the setting. Hope that makes sense.

#25

Thank you very much, zoo33. That's what I was missing. I've tried the module, it works perfectly and it seems like an essential module, even for (or especially for) the most simple blog site.

It would be very useful (I would say user-friendly) to include a warning on the install.txt to tell users that a max-value for the height must be set on the Image module and that those settings won't distort images (some users might be afraid of that and may just disregard the module, like I almost did).

#26

Status:postponed (maintainer needs more info)» closed (duplicate)

Although this issue has more participants, http://drupal.org/node/163043 contains a much cleaner description of the actual bug. Thus, marking this one duplicate.