Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


View this topic in a long page with up to 500 replies per page Create new topic
1 | 2 
richms
28198 posts

Uber Geek

Trusted
Lifetime subscriber

  #1748377 26-Mar-2017 22:50
Send private message

freitasm:

 

 

 

 

But when I quote it, the URL is img src="data:image/png;base64,iVBORw0KGgoAA..." which isnt that something server side? I have no idea, this is all too new for me to know about.





Richard rich.ms



richms
28198 posts

Uber Geek

Trusted
Lifetime subscriber

  #1748378 26-Mar-2017 22:52
Send private message

Oh crap. that didnt work out well.





Richard rich.ms

freitasm
BDFL - Memuneh
79314 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #1748379 26-Mar-2017 22:52
Send private message

It's not server side in the sense that it's not an image file but "text" stored in the database and delivered as part of the page markup - which is not cacheable and repeated everywhere it's used. Just look at the source for the previous page and you will see why the page loads slower than others.





Please support Geekzone by subscribing, or using one of our referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync 




richms
28198 posts

Uber Geek

Trusted
Lifetime subscriber

  #1748380 26-Mar-2017 22:53
Send private message

The actual thing was img src="  b l o b : h t t p : / / w w w .geekzone.co.nz/9608ee14-4091-4f81-9629-29acdcfa0f6c" without spaces. No idea how it got converted to that mess.





Richard rich.ms

freitasm
BDFL - Memuneh
79314 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #1748381 26-Mar-2017 23:01
Send private message

Also, using PNG instead of JPEG makes images bigger. PNG is only good for things like logos or lines. Photos have to be JPEG to be effective in terms of size.





Please support Geekzone by subscribing, or using one of our referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync 


tdgeek
29753 posts

Uber Geek

Trusted
Lifetime subscriber

  #1748432 27-Mar-2017 06:43
Send private message

Fred99:

 

 

 

The first started to load the quote, then bogged. Beachball (OSX Safari) Didn't freeze but bogged. Went back to the email tab (Safari-Yahoo webmail) and white screen, would not reload. Re activated the url in the dress bar, loaded email. GZ homepage tab still worked. The second pic was fine.


darylblake
1162 posts

Uber Geek

Trusted

  #1748436 27-Mar-2017 07:00
Send private message

What you could to solve that problem is on the server side after the post is made is post process it AND run a regex something along the lines of this: 

 

/<img.+src=\"data\:image\/(.+);base64,([A-z0-9\=\+]+)\"/

 

In this case the first item in the set will be the image type, second will be the content base64 encoded. Then write the image to a nginx/s3 bucket/cloudflare cache. With the correct extension/headers decoded. Then replace the match with an HTTP(s) link to the image. 

 

People should be hosting their own images anyway.


 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
darylblake
1162 posts

Uber Geek

Trusted

  #1748437 27-Mar-2017 07:02
Send private message

freitasm:

 

Also, using PNG instead of JPEG makes images bigger. PNG is only good for things like logos or lines. Photos have to be JPEG to be effective in terms of size.

 

 

Google have just made JPEG up to 35% smaller with better image quality: 

 

https://github.com/google/guetzli/

 

 


Dairyxox
1594 posts

Uber Geek


  #1748478 27-Mar-2017 08:25
Send private message

Interesting conundrum. 

 

On the plus side, base64 is convenient.

 

You can paste something from the snipping tool (for example) straight into the quick reply box, and submit, no uploading process necessary.


freitasm
BDFL - Memuneh
79314 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #1748479 27-Mar-2017 08:27
Send private message

darylblake:

What you could to solve that problem is on the server side after the post is made is post process it AND run a regex something along the lines of this: 


/<img.+src=\"data\:image\/(.+);base64,([A-z0-9\=\+]+)\"/


In this case the first item in the set will be the image type, second will be the content base64 encoded. Then write the image to a nginx/s3 bucket/cloudflare cache. With the correct extension/headers decoded. Then replace the match with an HTTP(s) link to the image. 


People should be hosting their own images anyway.



Good idea.

People should not use their own hosting and complain later when they don't have SSL.




Please support Geekzone by subscribing, or using one of our referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync 


Fred99

13684 posts

Uber Geek


  #1748517 27-Mar-2017 09:26
Send private message

Dairyxox:

 

Interesting conundrum. 

 

On the plus side, base64 is convenient.

 

You can paste something from the snipping tool (for example) straight into the quick reply box, and submit, no uploading process necessary.

 

 

Which is why I'd been using it.  I'll stop now - because from what I've seen there's a definite issue with Safari / OSX, also with (AFAIK) default settings with Chrome on Android the base 64 characters are downloaded quickly, but the browser is displaying that as the "gobbledygook" text - not parsing it as an image.

 

 


freitasm
BDFL - Memuneh
79314 posts

Uber Geek

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #1748520 27-Mar-2017 09:31
Send private message

As suggested above I will look at automatically convert a blob into a file and replace it in the forum when posted.





Please support Geekzone by subscribing, or using one of our referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies | Hatch | GoodSync 


jamesrt
1612 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #1748530 27-Mar-2017 09:44
Send private message

darylblake:Google have just made JPEG up to 35% smaller with better image quality: 

 

https://github.com/google/guetzli/

 

Good reduction; it took a JPEG of a photo from my DSLR from 14M down to 6.3M.  Slow, though:

 

$ time bin/Release/guetzli ~/Desktop/DSC_0005.png ~/Desktop/output.jpg

real    43m52.705s
user    40m27.351s
sys    1m57.240s

 

[The release notes do state it's slow and memory hungry.  They're not wrong.]

 

 


1 | 2 
View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.