March 31, 2021

Fix: Timber not resizing images

I just spent more than an hour debugging this so I need to write this down for my future self, and maybe it can also help someone out. Recently I had to deploy a site to Azure for a client, and Timber failed to generate thumbnails.

After debugging and digging through Stack Overflow and various forums I got to this GitHub comment on an issue.

WP_CONTENT_URL needs to reflect https status for timber image helper to be able to calculate relative path.

I’ve never had to deal with that variable before (probably because I’m not using Azure and my installs are on Linux servers?). Anyways, if you have that variable on wp-config.php, make sure it’s a full https ready URL:

define('WP_CONTENT_URL', '');