Jump to content

Peter Knight

Members
  • Posts

    1,466
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Peter Knight

  1. Latest updates. I had somewhat foolishly left development of the RTE integration until late in the day. But this week I am almost done with TinyMCE integration and a custom button on the toolbar. Initially I had planned on this flow user clicks the RTE media hub icon (insert image) A popup appears which displays images from the other fields on that page im so conditioned to this pattern that I overlooked something obvious. Why display just the images on a page when Media Hub can display all images in your hub? 🧐 Somehwhat unnecessarily, we’re asking clients to add an image to a field(s) Select insert image select image from step 1 again I’ll add a screenshot of the solution tomorrow. Would appreciate a second pair of eyeballs on this if anyone has time. P
  2. Hey @gebeer Yes, it's pretty wild and fun to watch sites being built by AI. Frightening too obviously ! I created an entire blog last week without touching the admin. Templates, fields, test content, pages etc created in about 5 mins. And 4 minutes of that were typing my instructions. But you could always save it as a 'recipe' and reuse it. No worries. I don't mind questions. 🙂 Yep, the JSON schema approach is a wrapper around the PW fields and templates API. It can create/update fields (type, label, description, inputfield settings) and templates (fields, family settings like allowChildren, urlSegments, etc.). Re. roles/permissions or module install/uninstall, I didn't need those. My workflow is quite simple, thankfully and doesn't involve clients updating their sites. I haven't used RockMigrations, but knowing Bernard's reputation, I imagine RockMigrations is significantly more comprehensive in that regard. Regarding the question about AppAPI Vs HTTP API, I had to ask the robots about that one and the reply is comprehensive but possibly not what you were asking. See below, but you're probably already familiar with the AppAPI stuff. BTW the Module isn't commercial, and anyone can try it. I want to clean up the repo before opening it up for wider use. Is the above any help to you? Did it answer your questions?
  3. Hey @szabesz Apologies - I had replied to people privately so you are probably thinking I am ignoring requests for info. I'll DM you now.
  4. You might want to create a separate thread / post for this as sometimes you can get more visibility on a fresh subject topic. BTW slightly related but for database backups, this module is a life saver. https://processwire.com/modules/process-database-backups/
  5. That looks interesting. I’d be curious how it affects analytics, Google tag manager and conversion tracking. 🧐
  6. Hey thanks for the link. Neat module. Was there a technical or philosophical issue with support for webp as input source image?
  7. MediaHub update.... TL;DR: MediaHub fields can now detect and import images used on the same page. A per-field import button scans other image fields on the same page and intelligently matches against the MediaHub library. It includes deduplication, perceptual hashing, and confidence badges. This saves significant manual effort when transitioning from standard image fields to MediaHub fields — i.e., you can run both in tandem while evaluating, or until you're ready to switch. I made the jump from building MediaHub to implementing it on a real client site. I ran into issues, and those pain points led to new features. It's a different experience switching from testing with Instagram images to deploying on a 15+-year-old client ProcessWire site — a significant commercial site that can't afford downtime. It features blog posts, staff photos, services, and the usual content you'd expect on a professional services site. Having more on the line meant I approached it with greater scrutiny, taking things slowly — up to a point. My approach: Add a MediaHub field on every page beneath the existing images field. Import each image individually (tedious, but reassuring). Add a script that outputs the MediaHub image first, falling back to a standard image if the MH API had issues. Apply data-type=mediahub to the HTML so I could quickly identify which images had yet to be ported. Step 2 became tedious once I'd confirmed the core functionality was solid. I already have a global import function that scans a site and imports existing images. But I wanted something different for this workflow. If I were an agency porting an entire site, what would be the most useful feature? How would I migrate one page at a time and confirm it was working, rather than relying on the global import? The answer was a localised import button on the MediaHub field itself. Pressing the import button scans existing image fields on the same page and opens a modal containing a list of images available to add to both MediaHub and the MediaHub field. It doesn't yet support Matrix pages, though it works correctly within a Matrix field. The modal assesses whether each asset already exists in MediaHub. Avoiding duplicate images is a core principle of MediaHub, so getting this right mattered. It handles most cases correctly. The one gap: images with different crops are treated as separate images — technically accurate, but better crop detection would be more useful in practice. That's next on the list.
  8. Hi, I have a question regarding WebP support that I would like to clarify. I added WebP to my allowed image extensions, and while uploads work fine and the original images display correctly, I'm seeing "not a supported image type" errors when ProcessWire tries to generate thumbnails or variations from WebP source files. After some digging, I found Ryan's blog post from 2019 which says: > "WEBP is purely an output format, not an input format... PNG and/or JPG images should still be the standard for any images you upload to your site." So it sounds like this is expected behaviour - WebP is designed for output (converting JPG/PNG → WebP for delivery) rather than input (uploading WebP and resizing it). Just wanted to confirm: Is this still the case in 2026? Is there any plan to support WebP as a source format in the future? For those who do allow WebP uploads - do you just accept that variations won't be generated? For now, I'm working around it by skipping resize attempts on WebP source images and using the originals, which works fine but results in larger file transfers for thumbnails. Thanks! Peter
  9. From what I know about MCP, it should, but I only use Cursor, so I can't confirm.
  10. Ryan, is this Module still usable? The link on the intro is pointing to an old/unfound page.
  11. Some updates to the MediaHub module I've added an import tool that lets you pull in all the existing images on your ProcessWire site without having to re-upload anything manually. If you've been running PW for a while before installing Media Hub, you'll probably have images spread across dozens of pages and fields, and doing that by hand is nobody's idea of a good time. The new Import tab (v104) scans every image field on your site, shows you what's out there in a nice table with thumbnails, dimensions, file sizes, which page and field each image belongs to, and crucially flags potential duplicates. So you can spot that the same hero image has been uploaded to 12 different pages and just import one copy. You can filter by field, template, or search by name, then select what you want and batch import the lot with a progress bar. There's also an Import by URL option if you've got images sitting on your server or hosted elsewhere that you want to bring in directly. Nothing groundbreaking, just one of those quality-of-life things that makes the difference between a module people install and a module people actually use.
  12. And I created an almost identical blog post about the module using the module, without opening the CMS admin once. That's the demo/use case right there.
  13. Ok done. MCP Module now support local->remote publishing. I guess there's not a big demand for this, but I find it really useful.
  14. Hey, if anyone is using Cursor for AI development, I just added some interesting functionality to the MCP module, including full 360 local/remote sync.
  15. Some updates to the Processwire / Cursor MCP Module. But first a recap (composed by Cursor) ProcessWire MCP — 360 Content Sync Between Cursor and Any ProcessWire Site With this Cursor MCP module for ProcessWire, you can say "Pull the about page, update the intro, and push it to production" — and Cursor does exactly that. No CMS login, no FTP, no copy-paste between environments. The module gives Cursor full read and write access to any ProcessWire site — local or remote — via a secure API. Pull pages down as editable YAML files, make changes in your IDE, and push them back. Or go the other direction: scaffold new pages locally and publish them to production in bulk. Fields and templates sync the same way, with diff previews and dry-run support before anything is written. The practical result is a genuine 360 workflow — content and structure moving freely between your local dev environment and any live site, driven entirely by natural language prompts in Cursor. What's new in this release: Remote site connection Cursor can now connect directly to any live ProcessWire site over HTTPS. Previously all MCP tools only worked against your local database — remote changes meant logging into the CMS admin manually. Now a single configured API endpoint is all that's needed. Schema sync — push, pull, diff Field and template definitions are exported as versioned JSON files. Compare your local schema against production, see exactly what would change, and push with a single prompt. Think of it as Prisma migrations for ProcessWire. Previously adding a new field to production meant recreating it by hand in the admin and hoping it matched local. Page content sync — pull Any live page can be pulled down to a local YAML file. Your content is now code — version-controlled, editable in your IDE, and diffable like any other file. Previously content only lived in the database and the only way to edit it was through the CMS. Page content sync — push Edit content locally and push it back to local, production, or both simultaneously. Dry-run is on by default so you see exactly what will change before it's applied. Cursor writes directly to the ProcessWire database via the API — the CMS admin is never involved. Create and publish pages remotely — without touching the CMS Scaffold a new page in Cursor, write the content, and publish it directly to production in one step. Template, parent, name, fields, and published status are all set via a single prompt. This is the foundation for more powerful automated workflows — bulk landing page generation, scheduled blog publishing, or programmatic content pipelines driven by keyword data or external feeds. Cross-environment page reference resolution Pages that reference other pages (a homepage featuring service pages, for example) previously stored those relationships as raw database IDs. Those IDs differ between local and production, so pushing a page reference to a different environment would silently link to the wrong page — or nothing at all. References are now stored with their URL path and resolved correctly on whatever environment receives the push. Pre-push reference validation Before any push, a new pw_validate_refs tool scans every synced page and checks that all page references actually exist on the target environment. It reports missing references (which would blank the field on push) and unpublished references (valid but hidden) separately. Previously a broken reference had no way to surface until it caused a visible problem on the live site. Coming next The next phase adds a staging environment tier (local → staging → production promotion), matrix and repeater item sync, and autonomous content publishing — where an external scheduled process generates and publishes SEO-optimised content directly to ProcessWire without Cursor or the CMS admin being open at all.
  16. I really like Sublime text. Slightly OT but have you tried Nova by Panic? I really like it and the built in remote server configuration: https://help.nova.app/remote-files/publishing/
  17. That's the one. You know it well ? Unfortunately, the gym here only has 1 of them. It's certainly the only cycling machine I know of that pumps out km and processwire code at the same time. Well, AI agents do at least.
  18. *nudge* 😉 is this just not a thing.
  19. Hi Whats the most straightforward way to create pages and fields on a remote PW site from my macbook / local version of the site? I've created an MCP server and some surrounding UI which can quickly do a lot of this locally but it seems like the next logical step with my Cursor / AI tool is to be able to quickly scaffold remote stuff too. Am I overlooking something simple?
  20. Media Hub update. Just a few small ones. You can rename the asset filename. If you select a folder or Collection, you can upload media / images directly into that I have started using Media Hub in one of my own live sites and it's highlghted some great areas for improvement etc. There's a significant difference between uploading a few Instagram photos and real staff photos, logos, and branding assets, which need to reside in multiple places across the site, yet remain a single image in the back-end. So, thats where I am. Hoping to ask for a few beta testers soon. If you're interested, please PM me.
  21. Yes already have it done. Each asset has a details page with a Usage table. This lists the places where an asset is used etc. The attached should give you an idea even if this asset is only used in one place.
  22. Media Hub update The Media Hub now has a folder view Folders is the default name for the view. It can be renamed to Gallery, Collections, Assets, Media, etc. Media assets can exist in one or more Folders so essentially they operate like Tags Clicking a Folder name will filter the main MediaHub by items within that Folder (and optionally sub folders) On an Asset detail view, you can quickly add and remove an association to a folder Support for Folder nesting, renaming etc is working
  23. Incidentally, when you mention you reached limits of performance, where and how did those limits manifest? I ran your query / issue through my AI Agent and had the following response. The Real Diagnosis Your friend likely experienced real slowness, but the cause is almost certainly inefficient query patterns (loading too many pages at once, N+1 queries, unindexed searches) rather than a fundamental limitation of pages-as-assets. These are the same problems any ORM-based system hits at scale, and they have well-known solutions. What MediaHub Would Need for 100K Assets Problem Fix Effort Crops filter loads all crop pages Direct SQL: SELECT DISTINCT master_id Small N+1 crop count per listing Batch query or denormalized count field Small LIKE search on title/desc Add FULLTEXT indexes Small Tag dropdown loads all tags Already paginated or use autocomplete Small No query caching Add WireCache for expensive queries Medium Standard pagination at scale PW handles this natively with start= + limit= Already done Streaming large exports Use $pages->findMany() (lazy loading) Small None of these require rethinking the data model. They're standard database optimization work. Summary The page-per-asset architecture is sound and scalable. ProcessWire's page model with proper indexing handles 100K+ pages without issue. The current MediaHub implementation has a handful of query patterns that would need optimization (mostly the crop filter and N+1 counts), but these are straightforward fixes. Switching to a JSON-in-field approach would solve the wrong problem while creating a bespoke data layer that loses most of PW's value and introduces its own harder-to-fix scaling issues. //END What do you think of above
  24. Hey David Thanks for that. I am planning another sprint next week. Right now, I am approaching this from a traditional image-as-page approach. Each crop variation of a 'master' image is also a separate page. That's possibly not as good for scalability but better from the point of view of having a new page image field listing all my images and crops. I dont have any sites with 10K + images so I'm happy enough with this solution but I will certainly reconsider and you've given me some other ideas too which I'll tackle next week. Will DM you re. other items. Cheers
×
×
  • Create New...