Need a little help for a project


I am making a project which have a main website that im doing using bootstrap and php… I have a nextcloud self host server/website with it too.

I would like to have a page on my main website that shows the pictures/photos from a group folder on my nextcloud… I don’t know if that is possible … I have looked into NC database to find where files are but i cannot find it…

So my main website would have a page with artworks that im showing and the NC server has a group folder named Artworks … so i’d like to be able to show the actual Artworks in the folder from the NC server on my main website…

I don’t really how to do that but I am pretty familiar with PHP and HTML/CSS so …

Thanks a lot for your help and i really appreciate yall helping :smiley:


I think it is not possible. First you need a public link to the folder if everybody can see the pictures. Maybe you can only integrate a link to the folder and the visitor of the website clicks on the link. I also do not know to what extent frames are possible.

If you have only a few pictures you can include every picture in two ways.

1.) add “/preview” to the path"
Share a picture:
Show picture directly with this link:

2.) use the app Sharing Path

The problem is perhaps the size of the images. On websites you only use smaller images. You should keep that in mind. Overall, nextcloud is not suitable to display images of a directory directly in web pages.

I will keep that in mind… but I would be surprise i cant do what i want man … its only a read permission … are the files stored in the database ? like individually ? it must be … If I can find where each file infos are stored in the database already it would be greate for me xD

No. It’s even easier. You can find the images under /path/to/nextcloud/data/username/files/path/to/photodir . If you use the same host and/or webserver (and same user e.g. www-data) i think it is no problem to write a php script to list all files and include them in the webpage. That is also no real security issue. Keep in mind that these directories are not directly accessible via webservices and should not be accessible.

You should provide the images in lower quality here, so that they are optimized for web pages. Theoretically, you can also use the smaller preview images, but they are much harder to find in the directory structure under /path/to/nextcloud/appdata_***/preview

Dope , yeah the nextcloud is in same “folder” under a folder named next-cloud in the folder where my mainwebsite is so it’s gonna be real easy like you said :smiley: cool :stuck_out_tongue:

1 Like