Skip to content

When Used with ACF/Timber/Twig there are PHP failures due to TimberImage process issues #14

@timnolte

Description

@timnolte

Describe the bug
When pulling an image via the Timber/ACF integration in Twig the resulting image is the proxied source image URL instead of the current site URL, which fails to find the image from the Media Library. This causes the TimberImage processing to fail with a critical error.

To Reproduce
Steps to reproduce the behavior:

  1. Install, activate, configure the plugin.
  2. Navigate to a page that uses code such as:
<img src="{{TimberImage(post.get_field('profile_picture')).src|resize(280, 280)}}" />
  1. Observe a site critical error.

Expected behavior
Ideally the code shouldn't error out fatally but return a proper Twig image object that has a source of the proxy site.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

  • PHP Version: 8.0
  • WordPress Version: 6.2.2
  • Plugin Version: 1.1.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions