How can I remove the "The image was resized to fit within the maximum allowed dimensions..." message without hacking core? By default, Drupal prints out a notification message that images exceeding the maximum dimensions were resized.  I want to disable this message.

The relevant line is located in file_validate_image_resolution():

  drupal_set_message(t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' =&gt; $maximum_dimensions)));


Obviously, the quick way to do this is to put two little slashes right before the line.  But I am trying to do this without hacking core.  I copied the entire function into MYMODULE_file_validate_image_resolution(), then commented the lines out, but this had no effect.  What's the right way to do this?
Disable Messages module helps you to disable any type of message in drupal.

It module has following features.


Filter out messages that match a full text string exactly.
Filter out messages that match a regular expression.
Permissions to specifically hide all messages of a given type from
any role.
Disable all filtering for specific users.
Disable all filtering for specific paths.
Apply filtering only for specific paths.
Debug system to get messages in the HTML without showing it to the
end users.


Once you install the module you can see the configuration options at admin/config/development/disable-messages.

For your requirement just enter following text in "Messages to be disabled:" textarea.

The image was resized to fit within the maximum allowed dimensions of .*? pixels.




Note : Make sure necessary permission to be set like below.