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 
22151 posts

Uber Geek
+1 received by user: 4728

Trusted
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

22151 posts

Uber Geek
+1 received by user: 4728

Trusted
Subscriber

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

Oh crap. that didnt work out well.





Richard rich.ms

 
 
 
 


BDFL - Memuneh
63573 posts

Uber Geek
+1 received by user: 14055

Administrator
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.





22151 posts

Uber Geek
+1 received by user: 4728

Trusted
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

BDFL - Memuneh
63573 posts

Uber Geek
+1 received by user: 14055

Administrator
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.





16346 posts

Uber Geek
+1 received by user: 3226

Trusted

  # 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.


948 posts

Ultimate Geek
+1 received by user: 311

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.






 
 
 
 


948 posts

Ultimate Geek
+1 received by user: 311

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/

 

 






1464 posts

Uber Geek
+1 received by user: 389


  # 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.


BDFL - Memuneh
63573 posts

Uber Geek
+1 received by user: 14055

Administrator
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.






8269 posts

Uber Geek
+1 received by user: 4555


  # 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.

 

 


BDFL - Memuneh
63573 posts

Uber Geek
+1 received by user: 14055

Administrator
Trusted
Geekzone
Lifetime subscriber

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

Ultimate Geek
+1 received by user: 287

Trusted
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



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Air New Zealand uses drones to inspect aircraft
Posted 17-Jun-2019 15:39


TCL Electronics launches its first-ever 8K TV
Posted 17-Jun-2019 15:18


E-scooter share scheme launches in Wellington
Posted 17-Jun-2019 12:34


Anyone can broadcast with Kordia Pop Up TV
Posted 13-Jun-2019 10:51


Volvo and Uber present production vehicle ready for self-driving
Posted 13-Jun-2019 10:47


100,000 customers connected to fibre broadband network through Enable
Posted 13-Jun-2019 10:35


5G uptake even faster than expected
Posted 12-Jun-2019 10:01


Xbox showcases 60 anticipated games
Posted 10-Jun-2019 20:24


Trend Micro Turns Public Hotspots into Secure Networks with WiFi Protection for Mobile Devices
Posted 5-Jun-2019 13:24


Bold UK spinoff for beauty software company Flossie
Posted 2-Jun-2019 14:10


Amazon Introduces Echo Show 5
Posted 1-Jun-2019 15:32


Epson launches new 4K Pro-UHD projector technology
Posted 1-Jun-2019 15:26


Lenovo and Qualcomm unveil first 5G PC called Project Limitless
Posted 28-May-2019 20:23


Intel introduces new 10th Gen Intel Core Processors and Project Athena
Posted 28-May-2019 19:28


Orcon first to trial residential 10Gbps broadband
Posted 28-May-2019 11:20



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.