S.L.P. Raspbian old image optimization

S.L.P. image questions, stereoscopic video livestream and recording, stereoscopic photo capture etc.
Post Reply
User avatar
zoldaten
Posts: 48
Joined: Fri Apr 26, 2019 7:07 am

S.L.P. Raspbian old image optimization

Post by zoldaten »

I noticed that when page loads tons of time taken by loading images ) :
2021-03-17_20h42_39.jpg
2021-03-17_20h42_39.jpg (8.12 KiB) Viewed 8289 times
So to speed up i just pass them through optimisator and result became:
2021-03-17_21h09_25.jpg
2021-03-17_21h09_25.jpg (6.68 KiB) Viewed 8289 times
So to do so u just need to upload optimized images and replace old ones. It can be tricky as there`s no VNC.
I recommend ftp. For example - https://www.xlightftpd.com/
After that u can upload them this way:
2021-03-17_21h18_47.jpg
2021-03-17_21h18_47.jpg (15.43 KiB) Viewed 8289 times
New images -
new_images.zip
(145.39 KiB) Downloaded 1821 times
Next i`ll look after js may be it can be optimized too.

User avatar
zoldaten
Posts: 48
Joined: Fri Apr 26, 2019 7:07 am

Re: S.L.P. Raspbian old image optimization

Post by zoldaten »

Additional optimisation.
Web file-manager.
2021-03-18_15h16_52.png
2021-03-18_15h16_52.png (14.09 KiB) Viewed 8283 times
Web-page time load before:
2021-03-18_11h27_46.png
2021-03-18_11h27_46.png (17.54 KiB) Viewed 8283 times
After optimisation:
2021-03-18_15h19_35.png
2021-03-18_15h19_35.png (13.14 KiB) Viewed 8283 times
What have done ?
All external links of js and css put to filesystem (most of all).

To do that you need put updated index.php to /var/www/html/files
And js and css after unpack to /var/www/html/files/js

Files -
js.rar
(239.72 KiB) Downloaded 1805 times
and
index.php.rar
(28.3 KiB) Downloaded 1820 times

User avatar
zoldaten
Posts: 48
Joined: Fri Apr 26, 2019 7:07 am

Re: S.L.P. Raspbian old image optimization

Post by zoldaten »

i`ve added to the web-page shutdown button.
It looks like this -
2021-03-18_16h51_11.png
2021-03-18_16h51_11.png (41.25 KiB) Viewed 8281 times
On push it just shutdown stereopi :mrgreen:

To do the same put to /var/www/html updated index.php -
index.rar
(4.09 KiB) Downloaded 1818 times
and to /var/www/html/imgs -
shutdown_icon.rar
(26.68 KiB) Downloaded 1803 times
(after unpack ofcause).

Make shutdown.php at the same dir where index.php is and put in it 1 string:

Code: Select all

<?php system('sudo /sbin/shutdown -h now'); ?>
Make shutdown.php executable:

Code: Select all

chmod +x shutdown.php

Post Reply