darktable + WordPress ?

This isn’t a theory if you’re using Hugo. It can parse json and CSV, so if you can export those formats for your album, you can use hugo to loop over it and generate the page.

1 Like

Well, I wanted to avoid Wordpress at some point of time because of its size, but other CMS are similar or even bigger. On top, WP has a plugin for everything you need and you don’t need to code your own. And for me most important, there are lots of booster that are specially designed for WP (such as EasyEngine, Centminmod etc.) that work only somehow with other CMS.

And for security, keep everything updated.

Can’t you just upload/ftp them directly into a WP media folder? Or maybe some plugins that can sync a desktop folder to WP? https://wordpress.org/plugins/file-manager/

This conversation seems surrealistic to me. After all that happened with Facebook, Cambridge Analytica, the US campaign, etc. nobody ever questionnated having a Facebook exporter in darktable. Same for Google. Both got updated recently, to account for the API changes.

But suddenly WordPress is a leaking bloated basket attacked every day and we should discourage users to use it for security reasons ?

I don’t get it.

So you would need an extra step to synch the media library, then another one to create a post ? That’s precisely what I want to avoid.

I think the reason for this is simple. These exporters were added by people who needed them and have never been discussed on this forum. If they would have asked the community beforehand, the same would have happened that happens here. Plus, it was another time with way less public focus on darktable.

I personally do not need any of these, and I do not get the point what’s so bad about exporting to the file system and then uploading wherever. Most of the time I move them to my nextcloud to share them e.g. with my son’s soccer team or the grandparents of my children.

What would be really clever would be some versioned output directory that caches all finalized images at their latest and earlier stages (each time they are exported) in full resolution, which would avoid exporting the same images over and over again just to upload them somewhere or changing the attached metadata.

use git on the export directory and do a commit after each export, preferably with a log message so that you could go back and find the version you’re looking for.

  1. lua can do this. We could export to a directory, then ftp to the media library.

  2. Not quite sure how to control wordpress remotely and get it to create a post. This one may take some thought.

  3. lua has access to the tags and the image information, so this is easy.

  4. This would need a database change, adding another field to the images table, or another table to keep track of url’s in the case of one picture used on multiple sites. lua can already access image information, so updating another column shouldn’t be a problem (minor code change in the lua image interface).

1 Like

And it would have the benefit from the ability to be updated asynchronously in the case of api changes.


that is not true. i very much question that we have exporters for dubious social media and many of the team have only been medium supportive for these plugins. but dt is a do-ocracy, people implement whatever they think is fun. we rarely pushed back hard on features we consider immoral (face detection).

1 Like

Ciao Pierre,
my very little contribution.
I own a small personal blog that is built on WordPress.
I choose WP because you can find a lot of plugins, a lot of themes, a lot of hosting offering WP already installed, a huge community of users that posts millions of articles/instructions on the net.
To be short WP is absolutely COMFORTABLE.
I am not a technician, I do not have time to study and learn a solution that involves coding.
I do not have time to study a page structure, a graphic, etc.
It is better if someone [skilled] else will do it for me.
What about safety?
Safety is overall important but how many users will store on their blogs sensitive/personal/important data?
If someone will hack my blog will find some photographs and some stories.
Is this a problem for me? No. My material is already public.
And I have also another question… WHO is actually available to invest time and hack my website? I think nobody…
(by the way - in my opinion - the ‘safety’ argument is nowadays overstimate but this is OT).
As regards publication on WP I see Jetpack plugin has a feature that let you post via e-mail. Maybe you can find some useful information about database fields etc. in its code.

I totally sympathize with proposing static generators for photo blogs over WP. I hope we can all agree that both sides have merits and even if one was a clearly technically superior, it’s still legitimate to like and use the other. Debating those merits is not the intention of the OP and deviates from his intent: Evaluating whether there is demand for a WP exporter from DT and if/how that might be implemented. So citing (somewhat selectively, I do believe it’s fair use though, otherwise rebuke me please)

I think it’s just fair to move the static generator vs WP discussion to another place and let this thread focus on a potential WP exporter in DT.


[quote=“Maurizio_Paglia, post:28, topic:15097, full:true”]
What about safety?
Safety is overall important but how many users will store on their blogs sensitive/personal/important data?
If someone will hack my blog will find some photographs and some stories.
Is this a problem for me? No. My material is already public.
And I have also another question… WHO is actually available to invest time and hack my website? I think nobody…[/quote]

This is not what hackers are interested in or even look at. WP hacking is mostly about installing some functions/scripts on your WP site to send Spam.
If you monitor your WP website you notice that you get constantly hits on plugins your don’t have (hopefully). They look for outdated plugins or themes that they can crack. Best way to stay safe is to update your WP site automatically, it’s also a good idea to rename the /content/ folder so your site does not look like a WP site to a bot.

And who want to invest the time? Correct nobody, automatic bots do the job.

1 Like

WP won’t create a media entry in the database by just uploading the files to the server. It needs an extra step through the Rest API.

You get a Rest API for that, so you can do it using curl and calling the right URL with a JSON file to embed the info. See https://wordpress.stackexchange.com/questions/325776/add-media-with-wp-rest-api-v2-ii

Note that WP has a desktop editing app allowing to post things remotely (which appears to be a modified chromium browser), so remote access is pretty complete.

(I don’t speak Lua).
If you know C and Python, Lua should not be a problem.

I’ve created a skeleton for the Lua script:

What is missing is the command to do the real post and the upload. Now some research is needed how to do it with the command line and curl or any other cml tool. If you post that, I can add that to the script. Or you can do that yourself. :wink:


As much as I’d love to continue the discussion around SSG/CMS, I think @rasimo has a good point, and I should apologize to @aurelienpierre for unnecessarily de-railing the conversation. I’m really sorry.

I think a WP exporter is a great idea if you’re willing to try an implement something. There are tons of people who will likely benefit from it and the use case seems reasonably strong (as evidenced by users in this thread who use WP and would probably like an exporter).


I played a little bit with lua several years ago, maybe is a good moment to try to check if I remember something.

Just in case:


This is what I already do. I just use git-annex because of the nature of the files. However, I am talking about a different topic. My topic was automation of result caching to prevent computation on re-export.

Edit: All exporters would then just package the cached pixel data and avoid re-rendering of the same image over and over again.

Ah, I see. Hmmm, I’ll have to think about that for awhile…

1 Like

Thanks a lot ! Having a model is very helpful, I will see if it needs to be tweaked some more for post galleries and such.

@Tobias, here is a docker-compose file that will set up a local wordpress environment that you can access at http://localhost:8080

docker-compose.yml.txt (578 Bytes)