Width and height views fields display the full image

Created on 29 March 2017, over 7 years ago
Updated 18 July 2023, about 1 year ago

If I use the width and/or height dimension views fields, instead of showing the width and height of the image (in text) I instead get the full image.

Steps to reproduce:

1) Install media_entity_image and it's dependencies
2) Create image media bundle
3) Add image field
4) Add a image entity
5) Create a view, showing media entities
6) Include a field, either Media: Thumbnail (height) or Media: Thumbnail (width)

You will notice the field formatter in use is for the image field, and not that of a text field.

Expected result:
I should get the image dimensions, in text

Actual result:
The actual image is displayed.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Leon Kessler

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.

  • πŸ‡ΊπŸ‡¦Ukraine vlad.dancer Kyiv

    Thanks @Dippers, works even in 2023!

    I've used this hook for paragraph image field. I think this issue should be moved into core.

  • πŸ‡¨πŸ‡¦Canada vamirbekyan Toronto

    this method outputs width and height of the original image and not of the selected thumbnail selected in the Formatter.
    Anyone knows how to output the selected thumbnail height and width?

Production build 0.71.5 2024