Fixes broken images and makes image logging work more or less okay.