benjaminkott / benjaminkott/bootstrap_package

SVG Icons Inline?

Open
#1,492 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# Bug Report

## Prerequisites

* [ ] Can you reproduce the problem on TYPO3 v11.5 LTS
* [x] Can you reproduce the problem on TYPO3 v12.4 LTS
* [x] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Abenjaminkott+repo%3Abenjaminkott%2Fbootstrap_package)
to see if your bug or enhancement is already reported?

## Description

Meine HTML-Datei werden übertrieben groß, über 5 MB, aufgrund von Inline SVG-Dateien in der Navigation / Subnavigation.

## Steps to Reproduce

1. SVG-Datei in der Navigation / Subnavigation verwenden.
2. Überprüfung der generierten HTML-Dateigröße.

### Expected behavior

Kleinere HTML-Dateien

### Actual behavior

Die HTML-Datei wird übertrieben groß, über 5 MB, aufgrund von eingebetteten SVG-Dateien.

### Screenshots

![image](https://github.com/benjaminkott/bootstrap_package/assets/4426920/78cd547d-04e5-43cc-953b-b747ea0cab0e)

## Versions

TYPO3: 12.4.16
Bootstrap Package: 14.0.7

## Anmerkung

Wenn ich in der Datei `vendor/bk2k/bootstrap-package/Classes/Icons/FileIcon.php` diese Abfrage auskommentiere, ist das Icon nicht mehr ein Inline-SVG und daher die HTML-Dateien kleiner.

```php
if ($image->getExtension() === 'svg') {
return SvgUtility::getInlineSvg('', $image, $width, $height);
}
```
## Frage
Warum wurde sich entschieden die SVG Inline einzubinden?

Contributor guide

No contributing guide indexed for this repository

Research direction

Read vendor/bk2k/bootstrap-package/Classes/Icons/FileIcon.php, focusing on the SVG branch that calls SvgUtility::getInlineSvg. Reproduce the issue with an SVG in navigation or subnavigation on TYPO3 12.4.16 and inspect the generated HTML size; done means establishing the intended SVG behavior and a concrete way to avoid oversized HTML.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.