57,63c57,60
<       $settings['link'] = variable_get('image_resize_filter_link_'. $format, 0);
<       $settings['class'] = variable_get('image_resize_filter_link_class_'. $format, '');
<       $settings['rel'] = variable_get('image_resize_filter_link_rel_'. $format, '');
<       $settings['lim'] = variable_get('image_resize_limit_all_image_sizes_'. $format, '');
<       $settings['limw'] = variable_get('image_resize_filter_limit_all_image_sizes_width_'. $format, '');
<       $settings['limh'] = variable_get('image_resize_filter_limit_all_image_sizes_height_'. $format, '');
<       $settings['image_locations'] = array_filter(variable_get('image_resize_filter_image_locations_'. $format, array('local')));
---
>       $settings['link'] = variable_get('image_resize_filter_link_' . $format, 0);
>       $settings['class'] = variable_get('image_resize_filter_link_class_' . $format, '');
>       $settings['rel'] = variable_get('image_resize_filter_link_rel_' . $format, '');
>       $settings['image_locations'] = array_filter(variable_get('image_resize_filter_image_locations_' . $format, array('local')));
183,204c180
<     '#default_value' => variable_get('image_resize_filter_link_rel_'. $format, ''),
<   );
< 
<   $form['image_resize']['image_resize_limit_all_image_sizes_'. $format] = array(
<     '#type' => 'checkbox',
<     '#title' => t('Limit the size of all images.'),
<     '#default_value' => variable_get('image_resize_limit_all_image_sizes_'. $format, 0),
<     '#description' => t('Images bigger than that will be scaled down to this size. Having or not the size attributes.'),
<   );
<   
<   $form['image_resize']['image_resize_filter_limit_all_image_sizes_width_'. $format] = array(
<     '#type' => 'textfield',
<     '#title' => t('Max image width'),
<     '#size' => '5',
<     '#default_value' => variable_get('image_resize_filter_limit_all_image_sizes_width_'. $format, 400),
<   );
< 
<   $form['image_resize']['image_resize_filter_limit_all_image_sizes_height_'. $format] = array(
<     '#type' => 'textfield',
<     '#title' => t('Max image height'),
<     '#size' => '5',
<     '#default_value' => variable_get('image_resize_filter_limit_all_image_sizes_height_'. $format, 600),
---
>     '#default_value' => variable_get('image_resize_filter_link_rel_' . $format, ''),
326,346c302
<       ${'needs_'. $property} = $needs_property;
<     }
< 
<     // If height and width are both missing, nothing to do here.
< 	//MN: we still need to set the max width and height if it is bigger than that and if limitation is enabled
< 	if ($settings['lim'] && $width && $width > $settings['limw']){
< 		$width = $settings['limw'];
< 	}
< 	if ($settings['lim'] && $height && $height > $settings['limh']){
< 		$height = $settings['limh'];
< 	}
< 		
< 	if (!$width && !$height) {
< 		if ($settings['lim']){
< 			$width = $settings['limw'];
< 			$height = $settings['limh'];
< 		}
< 		else
< 		{
< 			continue;
< 		}
---
>       ${'needs_' . $property} = $needs_property;
432c388
<     if ($location == 'local') {
---
>     if (is_file($local_path)) {
434,436d389
<     }
<     else {
<       $image_size = @getimagesize($src);
