Where to add new meta tags in Nextcloud

Hello, this is my first post in the Nextcloud Community. I’m new to Nextcloud, so I need to undestand the correct way/place to implement custom code.

I desire to add meta tags to generate a descritpion and an image by sharing a Nextcloud link, as describied in this topic (html - Meta tags for URL with description and image (In Skype, Discord) - Stack Overflow). Would be great an app that can implement custom meta content (for example og:title, og:url, og:image, og:description) when you share a link from Nextcloud; I haven’t found nothing like that. In which file I have to append custom meta tags to achieve the task by sharing a link on app like WhatsApp, Signal, Messenger, etc.?

Thank you

Sorry i can not really help you. But i think the first problem is the fact that you do not get a link to the image.

But you can use the app Sharing Path (video). But it think this is only useful with a small set of images. Perhaps Nextcloud is not the correct solution for your problem. Maybe you can better use a normal webserver with a php script to generate your meta data.

I found also this: https://metatags.io

Thank you, @devnull for your reply! You said:

you do not get a link to the image

…what exactly you get by sharing a link? That is, is the real file maybe embedded in a generated shared page? In that case, maybe could be possible implement meta tags in the generator of shared page… Thank you for your resources! Cheers

Good news. You actually can directly share an image. Just append /preview to the end of the shared URL and profit!

Unfortunately, sharing a gallery of photos is not yet possible unless you use a compatible third party application such as Photoprism.

1 Like

Yes thank you. And yes you get really the orignal image and not only a “preview” with lower resolution. I always forget that. But i do not know if every software interpret the url correct because there is no image suffix like “.jpg”, …

Then you get a full url with a the correct file name what is better for download, … You get e.g.:


Here an example for preview that differs from Sharing Path but perhaps is useful:

link: Nextcloud
preview: https://nc.nl.tab.digital/s/s8Q6LR4kSs8EBnY/preview
(just append /preview to share link)

On right click and “save as:” you do not get the name but only “500-500-max.png”. Perhaps someone can change it. On normal shares you get the normal name e.g. “Nextcloud.png”.

1 Like

Sorry to be late in my reply. Thank you so much, @devnull, for the demo, and thank you, @just, to post the really helpful info. In this way could be possible to use the image url in the css/html/js source code too, great!

I noticed that the meta tags generated by the https://metatags.io website are also in the source code of the Nextcloud’s login page, using the slogan as description and the file “favicon-touch.png” of the theme in use as preview image of the url, in messaging apps (for WhatsApp, you have to use an image of 300kb as maximum dimension).

Thank you!

1 Like