Bricks: 2.4.5
Bunny.net WordPress plugin: 3.1.1
Browser / OS: Chrome on Linux
Hi,
SVG and Icon elements do not render SVG attachments when the Bunny.net Content Offloader has moved the files to Bunny Storage and removed their local copies.
The SVG preview appears in the picker, but the canvas displays “No SVG selected” or an empty icon. The SVG is also missing from the frontend.
Steps to reproduce
- Enable the Bunny.net Content Offloader.
- Upload an SVG through the WordPress Media Library.
- Select it in a Bricks SVG or Icon element.
- Check the builder canvas and frontend.
What we verified
- The element settings contain the correct attachment ID and URL.
- The public SVG URL returns HTTP 200 and valid SVG content.
- The attachment has
_bunnycdn_offloaded=1, and its local file is missing. - In the SVG element’s PHP renderer, Bricks uses
get_attached_file()and reads the local file throughHelpers::file_get_contents(). - Excluding
*.svgfrom the offloader and uploading a new SVG resolves the issue.
The attachment remains valid and publicly accessible after offloading, but rendering appears to depend on a local copy.
Is there a supported integration for rendering offloaded SVG attachments in SVG and Icon elements? If not, could Bricks support retrieving their contents through the offload provider or an integration hook?
We can provide further diagnostics if needed.
Greetings