6

Is it possible to allow the selection of an image transform on an image that's been uploaded into a Redactor field?

9

Sure, from the Redactor "Insert Image" modal:

enter image description here

  • got it, never saw it on this Redactor field because the image wasn't enabled within the config. In the case of this post, the article was copied and pasted from another source, so I assume because the image wasn't a true Asset but rather just a reference, that's why it doesn't show the transforms? – Steven Grant Feb 20 '15 at 9:29
  • "the image wasn't enabled within the config" - not sure I'm following. – Brad Bell Feb 20 '15 at 17:39
  • the option to upload an Asset wasn't enabled. The image had been pasted from another source and as far as I can make out, you can't apply a transform to that kind of image within Redactor? – Steven Grant Feb 21 '15 at 18:47
2

When it pops up with the Craft UI modal to select an image asset you can select a transform in the bottom right

2

You can also use the free Retcon plugin to apply named or inline transforms at the template level, using Craft's native transforms or Imager if you have that installed as well. This isn't limited to Redactor fields, but any HTML at all.

Examples from the documentation:

{{ entry.body | retconTransform( 'yourNamedTransform' ) }}
{{ entry.body | retconTransform( { width : 1024, height : 768, mode : 'fit' } ) }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.