Repository navigation
Use local placeholder images in the Bootstrap theme - #464
Open
daphneslootmans wants to merge 2 commits into
Open
daphneslootmans wants to merge 2 commits into
daphneslootmans wants to merge 2 commits into
Conversation
The user templates and the Blog article fallback used placehold.it and via.placeholder.com, which has shut down, so their placeholders no longer loaded. They now point to a local image-placeholder.svg (4:3). icon-placeholder.svg (dashed square) is added for icon slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe Bootstrap theme now uses repository-owned SVG placeholders for user-template photo slots and Blog article fallbacks, removing its dependency on unavailable or redirecting external placeholder services. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
tijsverkoyen
approved these changes
Nov 2, 2026
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/image-l-image-r.html" line_range="3-6" />
<code_context>
<div class="row my-5">
<div class="col-md-6 mb-4 mb-md-0">
- <img data-ft-label="Image" data-ft-type="image" src="https://via.placeholder.com/610x405.png" alt="Image alt text" class="img-fluid w-100" />
+ <img data-ft-label="Image" data-ft-type="image" src="/src/Frontend/Themes/Bootstrap/src/Layout/Images/image-placeholder.svg" alt="Image alt text" class="img-fluid w-100" />
</div>
<div class="col-md-6">
</code_context>
<issue_to_address>
**Copying pages with placeholders fails**
When a page containing one of these user templates is copied before its placeholder image has been replaced, `Add::getOriginalPage()` treats these non-HTTP image paths as uploaded user-template files, then `Filesystem::copy()` tries to copy `image-placeholder.svg` from the user-upload directory, where it does not exist, aborting the page copy.
Exclude theme asset paths from the uploaded-image copy logic, or otherwise preserve them without attempting to copy them from the user-upload directory.
Also at `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/image-l-text-r.html:3`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/img-fullwidth.html:3`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/test.html:3`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/text-l-image-r.html:10`.
</issue_to_address>
### Comment 2
<location path="src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/img-fullwidth.html" line_range="3" />
<code_context>
<div class="row my-5">
<div class="col-12">
- <img src="https://via.placeholder.com/610x405.png" data-ft-label="Image" data-ft-type="image" alt="Image alt text" class="img-fluid w-100">
+ <img src="/src/Frontend/Themes/Bootstrap/src/Layout/Images/image-placeholder.svg" data-ft-label="Image" data-ft-type="image" alt="Image alt text" class="img-fluid w-100">
</div>
</div>
</code_context>
<issue_to_address>
**User-template placeholders appear broken**
When the deployment serves built theme assets from Core but does not expose the source tree, the template image URLs point to the source-tree path, which the deployment does not serve, so the browser cannot load the placeholders.
Point both template images at the built theme assets under Core/Layout/Images.
Also at `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/image-l-image-r.html:3-7`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/image-l-text-r.html:3`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/test.html:3-6`, `src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/text-l-image-r.html:10`.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/image-l-image-r.html:6, src/Frontend/Themes/Bootstrap/src/Layout/Templates/UserTemplates/img-fullwidth.html:3
Copying a page copied every user template image that is not a full URL from the upload folder. Theme assets such as the new local placeholders are not in that folder, so Filesystem::copy() threw and the copy failed. Images outside the upload folder now stay as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonasdekeukelaere
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Bootstrap theme's user templates and the Blog article fallback used external placeholder services.
via.placeholder.comhas shut down, so those placeholders no longer load.Adds
src/Layout/Images/image-placeholder.svg: a light grey 4:3 image with a simple sun-and-mountains shape, used for every photo slot regardless of its size.Adds
src/Layout/Images/icons/icon-placeholder.svg: a dashed 80×80 square for icon slots. Core has no icon placeholders yet, it is there for themes that need one.Replaces all 9 external placeholder images:
img-fullwidth,image-l-image-r(2),image-l-text-r,text-l-image-r:via.placeholder.comtest.html: 3placehold.itreferences (image,data-src, backgroundurl())Article.html.twig: the fallback for an article without an image, now{{ THEME_URL }}/Core/Layout/Images/image-placeholder.svgFixes copying a page that contains one of these placeholders:
Add::getOriginalPage()copied every user template image that is not a full URL from the upload folder, so a theme asset madeFilesystem::copy()throw. It now only copies images whosesrcis inFiles/Pages/UserTemplate.Ported from sumocoders-be-2026, where the same SVGs replace the placeholders in the Custom theme.
Test plan
node_modules,vendorand builtCorefolderstwigcson the Blog template: no violationsnpm run buildcopies the SVGs toCore/Layout/Images🤖 Generated with Claude Code
Summary by Sourcery
Replace external Bootstrap theme placeholders with local assets and preserve theme placeholders during image processing.
New Features:
Bug Fixes: