You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm optimizing images for SEO and can't seem to solve this issue:
I'd like to keep the image filename somewhere within the final images filenames I've found the option for 'storeOriginalFilename' however I'm having trouble passing it to the final filenames of the generated images.
Example of sanity auto-generated filenames being indexed with Google:
If you google 7b1b7cc7a4cf094b24cfd1ea6a6fa224865bc9e0 you'll get the incredible hulk due to the filename at: https://www.knutmelvaer.no/
Is there an example or documentation on how to accomplish this? Thanks in advance.
The text was updated successfully, but these errors were encountered:
Sanity lets you add a filename at the end of the url and return the originalFilename (or any wanted name) like this: https://cdn.sanity.io/images/{project-id}/{dataset}/{hashed-name}/{originalFilename}?params..
@mattias-lonn how would you get hold of the {originalFilename} in this case? Lets say that you grok an asset reference by doing asset->{url} or something, then you would get the something like url_path_/68167e1c7d2bc14d7be0a0bc01e2bb36e9ec76c2.yaml right. But let's say the uploaded name is test.yaml, where would you get that variable?
I'm optimizing images for SEO and can't seem to solve this issue:
I'd like to keep the image filename somewhere within the final images filenames I've found the option for 'storeOriginalFilename' however I'm having trouble passing it to the final filenames of the generated images.
Example of sanity auto-generated filenames being indexed with Google:
If you google 7b1b7cc7a4cf094b24cfd1ea6a6fa224865bc9e0 you'll get the incredible hulk due to the filename at: https://www.knutmelvaer.no/
Is there an example or documentation on how to accomplish this? Thanks in advance.
The text was updated successfully, but these errors were encountered: