Redactor: Greater control over where Assets get uploaded?

Created on 30 Apr 2020  ·  4Comments  ·  Source: craftcms/redactor

When adding a native Assets field, you get a certain set of options to help control where those assets get stored. But when adding a Redactor field, you get a _different_ set of options to help control where images are stored.

Here are your options when editing a Redactor field...

Redactor

And here are your options when editing an Assets field...

Assets

The two biggest disparities are boxed out in red above. Without these options for Redactor, I can't ensure that my Redactor fields and regular Assets are being uploaded to the same place. This is even more of an issue if you're trying to keep everything contained to a specific subfolder.

Is there any plan to bring parity between the two field types? In my opinion, Redactor's image handling options should be _identical_ to the native Assets field.

Let me know if you think this is possible! 🙂

enhancement

Most helpful comment

Use case:

A content builder matrix. I want the Text panel to share an asset folder with the Image panel.

Ω 2020 04 30-09 40 <a href="25@2x">25@2x</a>

All 4 comments

Use case:

A content builder matrix. I want the Text panel to share an asset folder with the Image panel.

Ω 2020 04 30-09 40 <a href="25@2x">25@2x</a>

+1
I have the same exact scenario, so I agree this would be a great way to customize your assets to give users complete control over the assets when you add content without manually picking folders every time. That might get confusing and lead to errors if someone forgets.

Yeah, this is complicated. The asset field setting isn't just a "point selector to here" setting - it also involves creating folders and files in a temporary volume. And then, after each parent element is saved, Redactor would be scraping its content to find element references, find the corresponding assets and move to a new folder, if required (if the folder path can now be resolved or has changed).

There are a lot of moving parts, which are now contained within the Asset field, logically. Of course, it can be refactored to a trait or something, but first, we'd have to figure out the long-term plan for Redactor. Seeing as how Imperavi have a new WYSIWYG editor now, it's unlikely they'll continue to push Redactor, and, well, there are some things we'd wish they would do differently, anyway.

For now, I'm leaving this issue open, though, as it makes sense to have that.

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cstudios-slovakia picture cstudios-slovakia  ·  6Comments

davist11 picture davist11  ·  13Comments

lukeyouell picture lukeyouell  ·  26Comments

timoteh picture timoteh  ·  17Comments

sandissauka picture sandissauka  ·  16Comments