- Issue created by @madhaze
- Status changed to Needs work
11 months ago 2:46pm 30 January 2024 - πͺπ¨Ecuador jwilson3
Please fix trailing spaces.
What impact will this patch have on existing fields that have not been configured this way? If there is any chance this could cause regressions for existing users, then the approach will need to be implemented with a new optional checkbox, as mentioned in the issue summary.
- πͺπ¨Ecuador jwilson3
+++ b/web/modules/contrib/svg_image_field/src/Plugin/Field/FieldFormatter/SvgImageFieldFormatter.php @@ -258,6 +258,32 @@ public function viewElements(FieldItemListInterface $items, $langcode) { + $attributes = ['width'=>$width, 'height'=>$height];
Might make sense to cast to an int (and optionally be sanitized) in one single place, before being sent to the Attributes array.
- πΊπ¦Ukraine Vadym.Tseiko
Vadym.Tseiko β made their first commit to this issueβs fork.
- Merge request !24Issue #3389670: Add ability to use original svg dimensions for height/width. β (Open) created by Vadym.Tseiko
- Status changed to Needs review
8 months ago 10:57am 23 April 2024 - Status changed to Needs work
8 months ago 1:43pm 23 April 2024 - πΊπ¦Ukraine Vadym.Tseiko
Hi @jwilson3, I thought that in comment #3 you meant the checkbox in formatted settings. When I re-rolled the patch I added to the formatter settings checkbox, labeled as 'Uploaded dimensions', if such enabled - then this code fires.
- Status changed to Needs review
8 months ago 7:24am 24 April 2024 - πΊπ¦Ukraine Vadym.Tseiko
Set to Needs review to get clarification, what further needs to be done.
- πͺπ¨Ecuador jwilson3
You're totally right. My apologies. I was rushing through my issue queue reviews and didn't connect the dots even though I was looking right at it. π€¦ββοΈ
Leaving in needs review because it needs to be manually tested, with screenshots, etc. Can't guarantee I can get to this level of testing at the moment, so I'm happy to have help from anyone else following this issue.