mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 14:39:34 -05: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
@ -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…
Reference in New Issue
Block a user