Get image on a directory then optimize all image to Webp (chrome based browser) or Jpeg (other based browser) and encode to base64
just call this file then call function with directory.
ex:
<img src="<?=show('/assets/path/to/image.png')?>">
Tested on system: Manjaro Linux, php73, Apache, Codeigniter 3.x
Maybe load page longer than usual because waiting for render image first
- Move all to Library
- Config (ajust index.png and notfound.png directory)
- Call library + Function
- move index.png and notfound.png
- Run!
other framework or using native php doesnt support by me. but you can modify it to run other framework/navive php