Hi is there a way to upload an image and have it stretched to a minimum width so it fills the entire column of my blog, a little bit of pixalation will not matter much for me. right now the only option is to have the image rejected if it is too small.

Comments

AlexBorsody’s picture

Priority: Normal » Major
quicksketch’s picture

Category: task » support
Priority: Major » Normal
Status: Active » Fixed

Just use ImageCache to output the image after setting up a preset to scale the image on output at a certain width. It will upscale the image as necessary. Note that this only affects the image on output, it does not affect the image when you upload it.

AlexBorsody’s picture

I need to be able to output these scaled dimensions through the filefields upload form. I set up the preset with image cache and it gave me this code under the export option.

Place the following snippet in your module as part of hook_imagecache_default_presets().

$presets = array(); $presets['image-stretch'] = array ( 'presetname' => 'image-stretch', 'actions' => array ( 0 => array ( 'weight' => '0', 'module' => 'imagecache', 'action' => 'imagecache_resize', 'data' => array ( 'width' => '425', 'height' => '100%', ), ), ), );

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.