Loading...
 
Skip to main content

Image transparency is lost when using Tiki File galleries

Status
Closed
Subject
Image transparency is lost when using Tiki File galleries
Version
30.x
Regression from 29.x to 30.x
Category
  • Regression
Feature
File Gallery (elFinder or standard UI)
Wiki Plugin (extends basic syntax)
Resolution status
Fixed or Solved
Submitted by
Bernard Sfez / Tiki Specialist
Volunteered to solve
Landry Bitege
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

Under certain condition the img plugin add image quality information that is breaking image transparency when using .png file.

On a Tiki 30 i have the following:
Image

A weird background is visible.

The plugins:


The HTML:

Copy to clipboard
<img src="dl571?display&amp;format=png&amp;quality=75" class="img-fluid text-center regImage pluginImg571 img-fluid featured " alt="Image">


If I remove "format=png" the image is displayed with the correct transparency.

It seems to come from here: lib/wiki-plugins/wikiplugin_img.php

Copy to clipboard
if (isset($imgdata['quality'])) { $src .= '&format=' . str_replace('image/', '', $imgdata['file']->filetype) . '&quality=' . $imgdata['quality']; }



Note a brand new Tiki by default (like demo.tiki.30.t.o) doesn't show the issue.
Could be file quality encoded data (on the file) or something that changed in the code.



I used the parameter "An image anywhere on the internet" and pointed to my file to fix the issue:

Copy to clipboard
{img type="src" src="display571" alt="Sovereign Offsite Backup Service" responsive="y" class="img-fluid text-center"}


Test on dev.t.o

Image

Solution
Workaround
Importance
8
Easy to solve?
3
Priority
24
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8981
Created
Saturday 16 May, 2026 09:12:27 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Thursday 21 May, 2026 16:18:47 UTC


Show PHP error messages