Closed (fixed)
Project:
FileField
Version:
6.x-3.9
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2011 at 13:53 UTC
Updated:
6 Jul 2011 at 06:03 UTC
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
Comment #1
alexborsody commentedComment #2
quicksketchJust 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.
Comment #3
alexborsody commentedI 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%', ), ), ), );