Opened 9 years ago

Closed 9 years ago

#1053 closed defect (fixed)

API Image object height/width attributes missing

Reported by: Jonas Haraldsson Owned by:
Priority: major Milestone: 0.8.0
Component: programming Keywords: api, image, height, width
Cc: Parent Tickets:

Description

Image containers in the API Image object doesnt have width/height attributes

current:

{
 u'fullImage': {
  u'url': u'gmg.tld/path/123.png'
 },
 u'image': {
  u'url': u'gmg.tld/path/123.thumbnail.png'
 }
}

expected:

{
 u'fullImage': {
  u'height': 128,
  u'width': 256,
  u'url': u'gmg.tld/path/123.png'
 },
 u'image': {
  u'height': 32,
  u'width': 64,
  u'url': u'gmg.tld/path/123.thumbnail.png'
 }
}

Change History (3)

comment:1 by Jonas Haraldsson, 9 years ago

Milestone: 0.8.0

comment:2 by Jessica Tallon, 9 years ago

Owner: set to Jessica Tallon
Status: newin_progress

comment:3 by Jessica Tallon, 9 years ago

Owner: Jessica Tallon removed
Resolution: fixed
Status: in_progressclosed

Fixed in 4a09d59. We didn't store the height or width for images when they were submitted so here will be some occasions when "height" and "width" are still missing. Sometime in the future it would be good to do a batch re-process of all images missing the data however we don't have the infrastructure yet and some users might not like a batch reprocessing if they have a lot of images.

Any image can be specifically reprocessed just to update the metadata by:

 $ ./bin/gmg reprocess run <MediaEntry ID> metadatabuilder <file>

where MediaEntry ID is the integer ID for the media (can be found via shell) and file will likely be original, medium or thumb.

Note: See TracTickets for help on using tickets.