Add an image field, required for WordPress posts

Posts get a nullable image_url. WordPressPublisher now downloads it
and uploads it to WordPress's media endpoint before creating the
post, setting it as featured_media — and rejects publishing (without
touching status) if a blog post has no image set, mirroring the
existing title requirement. Every other network treats it as optional.

Not enforced at save time, same as title — you can still draft an
incomplete WordPress post, it just can't be published until an image
is set. Exposed through the UI form (with a thumbnail/""missing""
indicator in the table), the JSON API, and the Python CLI wrapper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
m105
2026-07-21 20:03:25 +03:00
co-authored by Claude Sonnet 5
parent fd185ab813
commit 42abc658f2
14 changed files with 259 additions and 28 deletions
+4 -2
View File
@@ -26,8 +26,10 @@ Built with Laravel 13, Livewire, and Tailwind CSS.
(e.g. Reddit's browser automation) don't block the page.
- Built-in publishers (`app/Support/Publishing/`), one per network, resolved
by `Post.type`:
- **WordPress**: posts directly to a site's WordPress REST API. Also
available synchronously from the CLI: `php artisan posts:publish {post_id}`.
- **WordPress**: posts directly to a site's WordPress REST API, uploading
`Post.image_url` as the featured image first — required to publish a
WordPress post, optional for every other post type. Also available
synchronously from the CLI: `php artisan posts:publish {post_id}`.
- **Reddit**: drives a standalone Playwright sidecar at
`sidecars/reddit-post/` that logs in and creates a post.
- Anything else: no publisher yet — publish however fits, then report