Skip to main content

mr resource recalculate-dimensions

Re-read an image Resource's bytes and update its stored width and height. Useful after external file edits or when the original ingest path failed to decode dimensions. Does not modify the file content itself; only updates the database record.

Usage

mr resource recalculate-dimensions <id>

Positional arguments:

  • <id>

Examples

Recalculate dimensions for a single resource

mr resource recalculate-dimensions 42

Pipe from a list query to bulk-recalculate

mr resources list --content-type image/jpeg --json | jq -r '.[].id' | xargs -I {} mr resource recalculate-dimensions {}

Flags

This command has no local flags.

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Exit Codes

0 on success; 1 on any error

See Also