drupal rc2/image-cvs/img_assist_cvs/tinyMCE2.0.51

MySQL 4.0.25/PHP 4.4.2/gd_lib

settings » Image » Image sizes:
when using a predefined image size corresponding to the file's original resolution, the image doesn't display using tinyMCE drupal_image insert method or plain text method using img_assist only.

Manually entering the corresponding width and height using tinyMce doesnt seem to work either (whether by selecting the image and then clicking the drupal image button or context clicking in the tinyMce text field).

When fiddling manually with image dimensions (not using tinyMCE), the same is true. Original sizes dont display. Apparently some sort of aspect ratio contraint is applied (gdlib?) - and images won't display if one of the images dimensions given exceeds the corresponding dimension of the original (does that make sense, this needs some further testing...)

Smaller and even larger values on the other hand display just fine.

img_assist Settings:

Allow img_assist to create its' own image derivatives?:
1) 0
2) 1 (Yes, allow all img_assist users to create custom size inline images)
3) 1

Max inline image size allowed: 1024x768 (exceeds all stored files)

default size: "Thumbnail"
(others defaults aren't selected automatically in the popup window's drop down list)

default link behaviour: "Not a link"
insert mode: "Filter-Tag"
display settings: "include img_assist.css" active

(always using input format filtered html and logged as uid0 site-adm)

CommentFileSizeAuthor
#3 img_assist.diff.txt1.06 KBcrunchywelch

Comments

benshell’s picture

Category: bug » feature

I just fixed the default size bug(it'll be in the repository later today), but the original resolution display is unfortunately a bigger problem. I'm marking this as a feature request, because it's really not a bug. Img_assist relies on the _image_get_sizes() from image.module, which doesn't return the original as an option. At first I thought I'd just add the original size to the array returned by _image_get_sizes(), but it's not that simple. The originals are not fixed sizes (unlike the derivatives), so a lot of coding would have to be reworked to get this working properly. This isn't something I have time to do right now, but I'll keep this in mind and hopefully get to it eventually.

kennysto’s picture

A second request for display in original res. All I want to do is include an image on a page and have the option of linking through to a larger version of this image. I tried with the lightbox module which seemed to work when I included a thumbnail on the page but when I included a preview it linked to the node page instead of opening in a pop up.

To be honest I could just insert the html and be done with it, but I am making the site for a friend and I chose drupal hoping I would be able to hand the site over to him and that he would be able to publish content without needing to know html.

I guess the work flow I had in mind would be..

1. I create a page of text
2. I have an image on my computer (480x360) for example
3. I upload that image with the image module
4. I include a preview of that image in my page limited to ??px x ??px with img_assist, and since it is a great image I decide that I will let people click on it and see a bigger version (useful also for maps)
5. I include another image, only this time it is only page decoration and i dont think people want to see a bigger version so I do not include a link to the original image

crunchywelch’s picture

Assigned: gueva » crunchywelch
Category: feature » bug
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new1.06 KB

Here is a patch that resolves this. I am marking it critical bug since nothing is displayed on the default image size, which is pretty much the most common, since its, er, the default.

Its true that image.module doesnt provide maybe what it should if the size definition is the same as the original image size, but img_assist can work around this issue by checking to see during its 'close enough size' routine if the close enough size is actually equal to the image size itself, and if so, set the size label to _original. This is more efficient anyhow. Patched against 4.7.

Boinng’s picture

The patch doesn't work for me unfortunately - I'm still getting the same problem (exactly as described above).

Boinng’s picture

Just to say, again - this isn't working. Img assist as a whole seems majorly broken by this bug - if you can't post images in their actual size then really, what's the point?

benshell’s picture

What's the point you ask? The point of img_assist is put images inline in your posts. Most of the time the originals are going to be large, like 1024x768 or bigger (often digital camera res). And most of the time the inline images are going to be small, like 320x240. That's the point of img_assist. In future versions of img_assist I'll keep this request in mind, but you gotta keep in mind that I don't get paid to add features like this until a client needs them, and I'm overloaded right now with work that I do get paid for. You gotta either be patience, or code it yourself.

Boinng’s picture

I'm sorry, is this not the place to post bugs? Seriously, I'm not trying to offend anyone, but this isn't an unreasonable feature request, this is a bug report. It will affect your paying clients sooner or later - how can anyone using this module not be affected by the fact that it's impossible to post correctly sized images in their original size?

I'm not directly the plea for a fix directly at you even - in fact I was reporting on the fact that Crunchywelch's fix didn't work mainly. Perhaps he has the time to look at it again, even if you don't. Personally, I don't have the expertise, but I don't see what's wrong in raising the attention of those that do.

benshell’s picture

Category: bug » feature

It's a feature request because I didn't design img_assist to work this way. Img_assist relies on the image module, which handles the originals very differently from the derivatives. That's not to say I won't be able to add this feature in the future though.

Boinng’s picture

Category: feature » bug

No, this is staying as a bug report, because this is basic required functionality in a image assist module that is broken. Tell me that you designed it not to work with images in their original (perfectly reasonable) dimensions and my only answer can be (a) amazement, and (b) that this issue clearly needs to remain assigned to someone else, which is why it's remaining assigned to crunchywelch. He may not have time to deal with it either, but at least his acceptance that there is a problem here gives me some hope.

At the end of the day, if someone does come up with a fix, be grateful that you'll be able to provide that to your clients before they even ask for it (which, to be sure, they will).

benshell’s picture

Well, I'm not going to fight you by changing it back to a feature request... but if you were a developer you would understand. When you develop code, you develop based on a set of requirements. Sometimes those requirements are set by the client, sometimes they are set by a personal wishlist, and sometimes they are set by others (like the Drupal community). Most of the time, however, products do not meet all the requirements. Projects leaders or maintainers have to decide which requirements they are going to meet. I tried to meet most of the popular requirements when I redeveloped img_assist for Drupal 4.7, but img_assist will never be all things to all people. I had to pick and choose which requirements were absolutely critical and which were impractical or unnecessary. The ability to insert images as HTML code (not filter tags) is a feature that I originally wasn't going to include, because it was really difficult and most of the time it isn't necessary, but it quickly became clear that this was very important for many people, and it was a feature of the previous version of img_assist, so I went ahead and added this feature.

Adding original resolution images was something I thought about, and decided not to implement. I would have liked to add this feature, but it wouldn't have been nearly as straightforward as working with the derivative images (read my previous posts in this thread) so I decided it was best to go the simple route and get other bugs worked out and more important feature requests implemented. Just because it's important to you doesn't make it a bug. It may be a critical feature request, but it's not a bug. I always upload digital camera res photos, which I certainly wouldn't want to display inline, so for me this is unnecessary. Yes, sooner or later I'm going to have to add this feature for a client. But Boinng, all I'm really asking is that you take a moment to appreciate the 100's of volunteer hours I've put into this module. Img_assist is very useful right now even without this feature. You've been a Drupal.org member for only two months, and you're not a developer, so I don't expect you to know that from a technical perspective this is a feature request (you wouldn't know this unless you were familiar with the inner working of the image.module). You have every right to post bug reports and feature requests, but please respect those who develop and maintain modules by letting them make that classification. When I'm browsing the issues for my projects I don't want to see this show up as a critical bug report.

Anyway, sorry for the rant. I gotta get back to work.

phuc77’s picture

Is this related perhaps?
http://drupal.org/node/68623

darren oh’s picture

Status: Needs review » Closed (duplicate)

Duplicate of issue 89076.