Is there a way to create a folder structure for uploaded images in the e-mail builder?

Your software
My Mautic version is: 4.4.10
My PHP version is: 8.0.30
My Database type and version is: 10.6

Is there a way to create a folder structure for uploaded images in the e-mail builder?
I would like to sort the pictures into a folder structure so that they can be found more easily later. Is there any way to do it?

Hi @stefan-franz,

I’ve also tried to find a solution to this issue because the library can become messy over time. Unfortunately, I haven’t come across a solution as well. :frowning_with_open_mouth:

Best regards,
Ricardo

Hi @stefan-franz,
the closest to a folder structure we currently have is the “elfinder”, Mautics media manager. You can open it by adding “/elfinder” to the URL of your Mautic instance, for Example www.mymautic.com/elfinder.

There you can create folders, structure your uploads and delete older images.

But, as far as I know, having a structure made in the elfinder, has no impact on the image-block in the email-builder. The image selector still seems a bit messy.

Best
Leon

Can’t access to it.

Elfinder Answer

Hi @stefan-franz,
is there a corresponding log-entry?

First very wild guess would be to check wether you have CORS-Settings activated. “Settings” → “System Settings” → “CORS” and disable if not already disabled.

Best
Leon

Cors disable has no effect.
But no problem: I’ll wait until we have a stable V5.
Thanks, Stefan

Hi @stefan-franz,
just because Im very curious. Do you have commandline-access and can fire the "php bin/console elfinder:install" Command and check again if you can access the ElFinder?

Best
Leon

you can add this to the end of you local.php file:

if (!defined('ELFINDER_IMAGEMAGICK_PS')) {
    define('ELFINDER_IMAGEMAGICK_PS', '/usr/bin/convert');
}

then you can access your ELFINDER again

1 Like

Hmmm…don’t know if you did understood me right…and how about 5.0.4 - let me ask again (i’m a newbie, so please explain it for dummies :wink:

Now i use Mautic 5.0.4 - and it looks the same as in 4.4.10

My question: I’d like to have the possibility for subdirectorys like on a normal laptop - here e.g. subdirectory “persons” “products” “business” and so on.

  1. Is that possible
  2. if yes, how can i do it? What is elfinder?

@alexhammer
What file (in which directory) do you mean?
Does it work with 5.0.4?

the local.php file is where most of mautic setup data is stored.
it is in here: your/path/to/mautic/app/config/local.php

I added you lines to the local.php
It was in /var/www/html/mautic/config/

        'saml_idp_entity_id' => 'https://infxxxxxxxxxx',
);
if (!defined('ELFINDER_IMAGEMAGICK_PS')) {
    define('ELFINDER_IMAGEMAGICK_PS', '/usr/bin/convert');
}

If i want to use it, linktoMautic/elfinder
then only a white screen comes. May the access works, but no directory or files are shown.

But i tested the e-mail image requester. Here is no subdirectory viewable. So elfinder makes no sense. Hope that the file window gets in the future a file manager to manage subdirectorys.

You probably want to revisit the idea of building a media library on your Mautic install.

I have no doubt that the server stack can handle it. But asking that to as JS script? That’s a bit of wishful thinking - wrong tool for the wrong job (try it with few 100k media and let me know how it went. But my prediction will be much dark if you ask me).

Actually you may want to avoid as much as possible to store medias on your Mautic server. Leave that part to a third party like a CDN or an actual web server.

Mautic will act as a proxy where to get the origin, you need to request it to mautic. And then mautic will do a redirect to the origin. Super light weight server side (Apache can easily take care of hundreds if not thousands of concurrent requests. But probably not your hard drives)

This will keep your Mautic install clean, more secure, much lighter. And you’ll still be tracking email open rates and stuff while also sharing that info with the CDN/web server (double win).

Last bit;
The elfinder gui is used for other purpose. And not intended to be use with Grapjs Please see in the components for example.

Hope that it will help in your journey.