Height and width attributes missing for images

Created on 20 January 2015, over 9 years ago
Updated 23 September 2023, 9 months ago

The <media:content> field formatter is not adding some field_type specific attributes. In my case I'm missing width and height. Looking at the code I think I the reason is we check for $item['type'] instead of $field['type'] before adding the field type specific attributes.

Current output

<media:content 
   url="[img uri]"
   fileSize="10093"
   type="image/png"
   medium="image" />

Expected output

<media:content 
   url="[img uri]"
   fileSize="10093"
   type="image/png"
   width="100"
   height="100"
   medium="image" />
πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina mpv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024