Forum
Repeater in admin not show svg image
Hello, im using svg icon in repeater but in admin not show thumbnail.
when i inspect element code looks this:
<img src="/perch/resources/Icons/vidlika.svg" width="0" height="150" alt="Preview">
width is 0, if i change it on 150 its working.
here is diagnostic: SUMMARY INFORMATION
Perch: 2.8.25, PHP: 5.5.21, MySQL: 5.5.40-MariaDB, with PDO Server OS: Linux, apache2handler Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25), perch_events (1.9.2), perch_forms (1.8.3) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_events', ); PERCH_LOGINPATH: /perch PERCH_PATH: /nfsmnt/hosting2_2/9/7/9716c881-6165-4f98-940f-acc21b8d1a01/welten.sk/web/perch PERCH_CORE: /nfsmnt/hosting2_2/9/7/9716c881-6165-4f98-940f-acc21b8d1a01/welten.sk/web/perch/core PERCH_RESFILEPATH: /nfsmnt/hosting2_2/9/7/9716c881-6165-4f98-940f-acc21b8d1a01/welten.sk/web/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 48M, Max POST 48M, Memory: 128M, Total max file upload: 48M F1: dc1fef2ad0fcd9f943c02ebb43d85dbc Resource folder writeable: Yes HTTP_HOST: welten.sk DOCUMENT_ROOT: /nfsmnt/hosting2_2/9/7/9716c881-6165-4f98-940f-acc21b8d1a01/welten.sk/web/ REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
What dimensions does your SVG declare that it has?
I'd also advise against using a heavy WYSIWYG editor in a repeater - that's going to get messy fast.
First, you need to use perch:content in "img src", not perch:content with "output=tag" for SVGs specially. Also after you've set a width make sure images height is auto in the css.