I would like to be able to configure the dimensions (width/height) of the preview images (imagecache preset) in the browser.
As a suggestion I add a patch. What do you think, does this make sense?
The patch is missing an "imagecache_preset_flush" after changing the settings for width/height.
I tried to implement it in wysiwyg_imageupload_admin_settings_form_submit($form, &$form_state)
/*
* Implementation of hook_form_submit
*/
function wysiwyg_imageupload_admin_settings_form_submit($form, &$form_state) {
// If preview width/height changes, flush the imagecache preset
if ($form_state['values']['wysiwyg_imageupload_browser_preview_width'] != variable_get('wysiwyg_imageupload_browser_preview_width', 200)
|| $form_state['values']['wysiwyg_imageupload_browser_preview_height'] != variable_get('wysiwyg_imageupload_browser_preview_height', 200) ) {
imagecache_preset_flush('wysiwyg_imageupload_browser');
watchdog('info', 'Imagecache preset wysiwyg_imageupload_browser flushed after settings were changed.');
}
}
For some reason it seems that this is not the correct hook.
Any suggestion where to do this right?
Comments
Comment #1
jbiechele commentedThe patches and an additional .install
Comment #2
eugenmayer commentedWell just to sort things out, you want to modify the size of the images in the image browser. We have to options here:
1. using CSS: Well thats not the "cleanest" way to accoplish this, as images of a bigger size are loaded probably. Overall bad qualitiy
2 We can set the imagecache preset-type to use in the admin interface
Well iam all for approach 2
Comment #3
jbiechele commentedYes ok I fully agree with your option 2.
with the additon to adjust the css and eliminate width/height properties in class .browser_image.
Comment #4
eugenmayer commentedComment #5
gausarts commentedsubscribing. Thank
Comment #6
whatsnewsisyphus commentedsubscribing
Comment #7
eugenmayer commentedI have reimplemented it a bit, its now included in 6.2
Comment #9
eugenmayer commentedComment #10
eugenmayer commented