XF 2.2 Where or How to replace image proxy placeholder?

You could make a simple add on to replace the imageproxy.php function

Code:
/**
     * @return \XF\Entity\ImageProxy
     */
    public function getPlaceholderImage()
    {
        // TODO: ability to customize path
        $path = \XF::getRootDirectory() . '/styles/default/xenforo/missing-image.png';
        /** @var \XF\Entity\ImageProxy $image */
        $image = $this->em->create('XF:ImageProxy');
        $image->setAsPlaceholder($path, 'image/png', 'missing-image.png');
        return $image;
    }


note, there's a TODO comment in here, so it may be coming soon.
 
  • Like
Reactions: rdn
Top Bottom