Posted by ice70 on December 21, 2012 at 5:37pm
Hi
I have CKEditor up and running and it uses IMCE to upload images.
I also have image sizes built in image styles [Home » Administration » Configuration » Media » Image styles]
In a content type, I can apply the image size pre-set to an image field, but I can't see how to apply an image size pre-set to an image that has been added to long text [ie managed through the CKEditor]?
Any suggestions?
Thank you for your help
ice70
Comments
Gave up trying to get IMCE to
Gave up trying to get IMCE to do this
I was wanting to use the responsive image module
http://drupal.org/project/resp_img
Which seems to be easily integrated with the Media module:
http://drupal.org/project/media
But, the media module only looks to have 1 responsive image preset. It does have other presets, like large and so on, but as they are default I was was a little reluctant start editing them - esecially as there is one term for responsive and the rest sound like default images.
So I added all my responsive image styles [/admin/config/media/image-styles], then created a custom module:
function MODULE_NAME_entity_info_alter(&$entity_info) {// Support the media module
$entity_info['file']['view modes']['media_responsive_1'] = array('label' => t('Preset Name'), 'custom settings' => TRUE);
}
Once enabled edit the media file display:
admin/config/media/file-types/manage/image/file-display
you now have more tabs to apply settings to [e.g. in the code above, 'Preset Name'] - you may have to clear your cache to see them?
Apply your pre-sets and now you can have multiple custom responsive image options in the media window.
Hope that makes sense!