Skip to content

Timber 2 returns null when trying to use "get_image" on an AVIF image #3015

@arlg

Description

@arlg

Expected Behavior

Timber::get_image($id) should return image data. It insteads returns NULL when the image is an image/avif type.

Actual behavior

Should return image data.

Steps to reproduce behavior

Fill an AVIF image on back-end. Then try to get the image with get_image on front -> The function returns null.

If i use the outdated method from Timber 1.0 "Image" (ex: Image(image_id)), it works.

Notes

No response

What version of Timber are you using?

TImber 2.0

What version of WordPress are you using?

WordPress 6.2

What version of PHP are you using?

Php 8.2

How did you install Timber?

Installed or updated Timber through Composer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions