Photos filed into the CRM media library, in folders

Images uploaded from the platform land in the account's own CRM media library, organised into a folder path that is created on demand and cached.

What it is

Server helpers walk or create a folder path (for example a year and month under a named root), then upload a buffer into that folder. Folder ids are cached per account and parent so repeated uploads do not re-list. When the upload response omits a URL, the file metadata is fetched by id to obtain it.

Also called: upload photos to CRM · media folders · job photo storage

See it
Photos filed into the CRM media library, in folders
Area
Integrations
Group
GoHighLevel
System
GoHighLevel
Solves
2 named problems
01Caller resolves a media context (token, location, org).
02ensureGhlFolderPath walks the path, creating any missing folder.
03uploadBufferToGhl posts the file with the folder as parentId.
A folder tree in the media library (root → 2026 → 8. Aug, Contacts) with thumbnails, and a size badge showing the WebP saving. Sample data — no customer information appears here.
How it works
  1. 1Caller resolves a media context (token, location, org).
  2. 2ensureGhlFolderPath walks the path, creating any missing folder.
  3. 3uploadBufferToGhl posts the file with the folder as parentId.
  4. 4If no URL comes back, the file id is used to read the metadata.
  5. 5The returned CDN URL is checked for tenant ownership before being used.
Why we built it

The file records a vendor quirk and a correction. The quirk: 'GHL quirk that still holds: parentId (not folderId) both when creating folders and uploading.' The correction is dated and blunt: 'CORRECTED 08-22: this file used to say "JPEG/PNG not WebP". That was tested against the live API and is FALSE — a WebP upload returns HTTP 201 with a .webp filesafe CDN URL, exactly like JPEG. New image work goes through src/lib/imagePipeline.ts, which emits WebP on purpose (25-35% smaller at equal quality). Do not reintroduce a JPEG-only rule here.'

The problem
  • Uploaded images had no consistent filing structure.
  • A false format rule was forcing larger files than necessary.
Sound familiar?
What you get
Photos are filed into a predictable folder tree automatically.
WebP uploads keep files 25-35% smaller at the same quality.
Folder lookups are cached per account.
What's inside

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →