Is it possible to use an Image Style in a text field? Image Styles is a great feature in Drupal. Is it possible to apply a preset Image Style to an image that is brought into a long text type field that uses WYSIWYG in Drupal 7? That is, for use in the basic node, not in a View.

Currently, we're using the IMCE WYSIWIG bridge to insert images in the textfield, and there seems to me no way to indicate what preset Image Style to use.
It depends on what you mean by "possible" :-).

The Scald module (integrates with the WYSIWYG CKeditor) uses something called "contexts" that in turn makes use of the preset image styles.  So it is certainly possible to do this if you use Scald to insert images into WYSIWYG.

Scald has a drag'n'drop UI that allows you to place an image (or "atom" in Scald-speak) into WYSIWYG. When you do that, you can set its legend (i.e. caption), context and alignment (see sample dialog below):



In this case, the "Context" is set to "Full page". which I have associated with the preset Image Style known as "Large 480x480".

Below, you can see the markup that is generated by Scald as a result of this, and you can see that it links to the image using the path:

public:://styles/large/public/thumbnails/image/fredespenbenth.jpg


the styles/large path is indeed the image cache for the preset "Large 480x480" image style.

&lt;div class="dnd-atom-wrapper type-image context-sdl_editor_representation atom-align-right" contenteditable="false"&gt;
&lt;div class="dnd-drop-wrapper"&gt;&lt;!-- scald=2:sdl_editor_representation {"link":""} --&gt;
&lt;div class="image"&gt;&lt;img alt="Fred Espen Benth" src="http://example.com/sites/default/files/styles/large/public/thumbnails/image/fredespenbenth.jpg?itok=TwJhh_s6" style="height:320px; width:480px" title="Fred Espen Benth" /&gt;&lt;/div&gt;
&lt;!-- END scald=2 --&gt;&lt;/div&gt;

&lt;div class="dnd-legend-wrapper" contenteditable="true"&gt;
&lt;div class="meta"&gt;&lt;!--copyright=2--&gt;This is the caption that will appear under the image.&lt;!--END copyright=2--&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;


Now, as you can see, Scald is doing this, so it must be possible.

And you can (to some extent) do the same thing without Scald by inserting similar markup "by hand" or with the help your own custom module.  But Scald has in place additional magic to regenerate that style of the image in the image cache if it does not exist.  If you do this just by inserting the markup, you can't be sure that the image exists in that style, so you have to use other means to make sure the image cache is populated with the styles you actually use.  (For example sniffing for URLS pointing into the cache in hook_preprocess_node(), and regenerate those that are missing.)