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


#1

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.


#2

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.


#3

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.


#4

The endpoint already allows that :slight_smile:


#5

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


#6

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


#7

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


#8

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


#9

Yes, please. I will have a look today.


#10

Hi,

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


#11

Really great ! thank you :slight_smile:


#12

Deployed to the cloud


#13