I wanted my default image size to be "original", so I modified img_assist.module to change this:

  $form['size_label'] = array(
    '#type' => 'select',
    '#default_value' => variable_get('img_assist_default_label', '800x800'),
    '#options' => $derivatives,
    '#attributes' => array('onchange' => 'parent.onChangeSizeLabel()'),
  );

to this:

  $form['size_label'] = array(
    '#type' => 'select',
    '#default_value' => "Original", 
    '#options' => $derivatives,
    '#attributes' => array('onchange' => 'parent.onChangeSizeLabel()'),
  );

This is a bit of a kludge though-- ideally, however, "original" would be included as an option in the administrative settings for img_assist. Obviously, if the original is larger than the maximum allowed size, original won't be among the options.

Comments

sun’s picture

Status: Active » Closed (won't fix)

Obviously, if the original is larger than the maximum allowed size, original won't be among the options.

I wonder whether you realized that you do not need to hack the module. You mentioned the proper solution already.

ged3000’s picture

The issue is not within the settings that the user sets when he inserts an image, but with the default settings, within the admin pages. There, the size of the size of the original image is unknown, as it has not yet been uploaded. Personally, I wish to use this module to upload and insert images, without any server-side processing or image resizing. Without the option to set the default size for inline images to original, this involves an extra setting change every time a user uploads an image, creating a usability issue, as well as meaning that users require extra training before they are able to use the module in the way that i want them to.

ged3000’s picture

See #401882: Unable to set default inline image to Original for duplicate issue.

I'm now a bit confused about the right etiquette regarding this post. To my mind, my original issue - that I could not set my default size for inline images to 'original' is a bug report, rather than a task, but I wonder if I am just not understanding the category options?

Also, I feel that this is still an active issue despite the above patch suggestion and other solutions suggested. Does that warrant a change in the status?

Apologies for my naivety in terms of the issue settings.

sun’s picture

Title: How to set default image size to "original" » Allow to set default image size to "original"
Version: 6.x-2.0-alpha3 » 6.x-3.x-dev
Category: task » feature
Status: Closed (won't fix) » Active

Oh well. Why didn't you just do what I asked you to do in the other issue? Anyway. Re-opening, so this is the central issue from now on.

Also, you could read the description that is displayed for those issue settings: "Descriptions of the Priority and Status values can be found in the Issue queue handbook."

And, this is a feature request. New features go into HEAD first.

sandb’s picture

Having the same problem.

Maybe this could be fixed by removing the "Maximum inline image size allowed:" all together? Seems to me the max inline size option is not needed:

- If the user chooses an image size other than "Original", e.g. "Thumbnail", the maximum height and width are already handled by that image size, and the max inline size option does not make sense.

- If she/he chooses "Original" (which he can't right now) the max inline size option equally does not make sense.

But I'm new to Drupal, so could be dead wrong.

Gr,
Sandb.

sandb’s picture

//removed

Anonymous’s picture

I think removing "Maximum inline image size allowed:" makes a lot of sense for the reasons outlined by sandb. I support it.