[IMPLEMENTED] Use image slug instead of image id when adding image in rich text field

For SEO purpose google likes that the image has a name that make sense.

It would be nice if it somehow was possible to import images into the rich text field, by using the slug of the image instead of the id.

Good point. The slug field is relatively new, but it should be easy to change the behavior now :slight_smile:

The only problem is that the slugs are not necessarily unique.

The main issue to solve is that the name of image is something that make sense in terms of the content.

Another approach could also be that we allow on the endpoint something like this:

http:///api/assets/{id}/{chosen-by-the-consumer.jpg}?{image-resizing-parameters}

This could by default then just add the slug in the url, but still make sure it’s unique in combination with asset id.

I’ve implemented this in our eco-system in our DAM integration, and this allow the users of the assets to select a name that match the content.

The endpoint already allows that :slight_smile:

Ahh, but then i guess it just to add slug as default if it’s there?

I just tried this, which work.

https://url/api/assets/a6fb8e7a-3b1b-43be-8959-33759e552c7b?download=0

But this doesn’t work:

https://url/api/assets/a6fb8e7a-3b1b-43be-8959-33759e552c7b/test.jpg?download=0

Am i missing something?

I’m hosting locally through docker

Should be fine, perhaps it is me, who broke something

Okay, should i create a bug report? I can’t make it work on the cloud version either

Yes, please. I will have a look today.

Hi,

I have implemented it, but it is not deployed to the cloud yet.

Really great ! thank you :slight_smile:

Deployed to the cloud

1 Like