Skip to content

[6.x] Reduce amount of data provided in Assets fieldtype meta#14366

Merged
jasonvarga merged 4 commits into6.xfrom
assets-fieldtype-data
Mar 27, 2026
Merged

[6.x] Reduce amount of data provided in Assets fieldtype meta#14366
jasonvarga merged 4 commits into6.xfrom
assets-fieldtype-data

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request reduces the amount of data we send to the client in the Assets fieldtype's meta object.

We previously returned the entire AssetResource. However, when you have a lot of assets fields and particularly a lot of folders, the size of the nested actions array starts to build up.

This PR creates a new JSON resource for asset items, like we do in the entries fieldtype, so we only return the data we need for the fieldtype.

Fixes #14278

@duncanmcclean duncanmcclean marked this pull request as ready for review March 26, 2026 15:35
Add url, downloadUrl, isMedia, and isEditable to the slimmed-down
resource so the frontend asset tile renders correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasonvarga
Copy link
Copy Markdown
Member

fyi a bunch of keys were missing so stuff wasnt being displayed correctly

jasonvarga and others added 2 commits March 27, 2026 14:58
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoids going through the augmentation system via __get.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasonvarga jasonvarga merged commit 3d3dfbe into 6.x Mar 27, 2026
17 checks passed
@jasonvarga jasonvarga deleted the assets-fieldtype-data branch March 27, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't open entry in Firefox (NS_ERROR_ILLEGAL_VALUE)

2 participants