urlTransform rewrites the public URL the plugin generates for a file — add query parameters, a cache-busting timestamp, or take full control with a custom function.
payload.config.ts
Simple transform
Custom transform function
For full control, providetransformUrl instead. It replaces appendTimestamp and queryParams — you build the URL yourself.
Return the final URL string.
What baseUrl is
urlTransform runs in both access-control modes — it always rewrites the url field. What changes is the base URL it starts from, which matters when you write a transformUrl function: