My use case is this: I have a blog hosted in a shared server, and I had not too much disk space. Whenever I wanted to insert an image, I had to upload there. But, as I have a home Nextcloud server, I’d like to use the files directly from within it, as it would save me a lot of disk space in the hosting.
It would one of those little things that help spreading the word.
As I understand it you want serve the media files directly from the nextcloud. With webdav you access the files, but not publish them.
We are now thinking about a preview API to serve images https://github.com/nextcloud/server/issues/2523
Also following. I would really like to see this feature. The WP developer and user community is HUGE and I know many WP devs who would love to have a feature like this and allow them to do away with subscriptions etc to Amazon or Dropbox.
This would literally be a game changer for WP development, literally.
I don’t think that exactly meets the functionality for batch uploading stuff to Wordpress though right? At least in my understanding the way that I would want to use it, is for it to allow me to have a synced NextCloud folder on my computer that I could just drop a batch of photos to and they would sync to a folder on my NextCloud Folder which could then get auto uploaded into my WP media library. This wouldn’t be the same thing in my mind as just using NextCloud as an FTP upload either, since most WP websites make extensive use of caching, automatic image transformation, and CDN, so while you might want to use NC to upload your files to WP you wouldn’t actually be calling them from the NC server via preview urls etc.
I mean that’s my take on it. I’m by far the least experienced dev here!
FWIW, I can’t even get NC to embed even one of my pictures in my WP blog, much like @just tried above. I don’t think it can ever act as a repository, which means that I have to spend double storage for having one file in NC for myself, and displaying it via WP.
Does [Embedding] Work With Any URL?
No, not by default. WordPress will only embed URLs matching an internal whitelist. This is for security purposes.
Adding support for an additional website depends on whether the site supports oEmbed. If a site supports oEmbed, you’ll want to call wp_oembed_add_provider() to add the site and URL format to the internal whitelist. Otherwise, you’ll need to register a handler using wp_embed_register_handler() and provide a callback function that generates the HTML.
On this regard I would like to know if this usercase could be interesting: I would like to link a radio recording file that I have stored on a hosted nextcloud instance from a page on wordpress. This would allow me to spare space on the webserver.
Would it be possible in your opinion? Is .ogg and .mp3 files…
I have a similar use case that I don’t know if it works or how to get it work.
I have some videos on my nextcloud instance, that people collaboratively produced. Now it would be great if they could embed the public share-link from the video on nextcloud in their respective drupal or wordpress blogs.
At least for drupal I know there is a module to allow to add custom oembed providers; but I cannot figure out from the discussion above whether nextcloud allows or is capable of providing embed-able content, and if so, how to achieve this.
A decent alternative is to use HTTP and let the files be served by your web server! Store your public files in a folder in your Nextcloud public root so they are available by HTTP (eg. https://nextcloud.example.com/public/), then set an local external storage in Nextcloud to the path of that folder. Since it’s right into your Nextcloud root, there should not be any file permission issues. You can even organize them in folders if you wish.
Everything in that folder will be directly available to the Internet. You can then embed any media file from that folder anywhere you want.
Created myself a WordPress plugin to connect external services as files / directories inside WordPress. The sources are kept stored on the remote location. But it is possible too to import them into WordPress. [visa versa too]
Sorry to let you know I am not publishing my own Plugins on the WordPress Plugin pages because the whole process of accepting isn’t it worth for me.
If you are interested … Just let me know. Maybe we are able to work something out.