mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-13 09:49:35 -04:00
Fix image data URI
Make JPEG images use the image/jpeg mimetype instead of the wrong image/png one.
This commit is contained in:
parent
64f4d84e74
commit
bb4b8f0bc5
1 changed files with 3 additions and 1 deletions
|
@ -274,7 +274,9 @@ bool ImageUtil::optimizeSizeHtml(QString &html, const QImage& original, QImage &
|
|||
if(optimizeSizeBytes(bytearray, original, optimized,has_transparency?"PNG":"JPG",maxPixels, maxBytes))
|
||||
{
|
||||
QByteArray encodedByteArray = bytearray.toBase64();
|
||||
html = "<img src=\"data:image/png;base64,";
|
||||
html = "<img src=\"data:image/";
|
||||
html.append(has_transparency ? "png" : "jpeg");
|
||||
html.append(";base64,");
|
||||
html.append(encodedByteArray);
|
||||
html.append("\">");
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue