SSWConsulting / SSW.Dory

SSW.Dory - Sharepoint and GitHub
http://sswdory.com
1 stars 0 forks source link

♻️ Change svg screenshots that are broken to a different format #75

Closed Jord-Gui closed 1 year ago

Jord-Gui commented 1 year ago

Cc: @JackDevAU @tiagov8 @leahy268

As raised by @bradystroud, the screenshot on the website and repo that is svg format is broken. Change it to png. Can even optimise all images to be in WebP. Check out this convo with ChatGPT on the benefits of WebP.

Image

Figure: SVG not loading on website

Image

Figure: SVG not loading on GitHub readme

### Tasks
- [x] Swap broken svg to png
- [x] Investigate webp and implement
Jord-Gui commented 1 year ago

FYI In regards to my discussion with @bradystroud where GPT4 said using next/image automatically converts png to webp and we thought it was spouting nonsense: our NextJS build configuration currently has Image set to 'unoptimised' to resolve a path issue where the images weren't loading. Thus, the Image component may in fact natively convert png to webp if we can just get the pathing issue resolved.

Image Figure: Blank images due to path issue from Image optimisation

Image Figure: Weird path to images after Image optimisation

Image Figure: NextJS Image set to unoptimised to resolve blank website screenshots

Image Figure: Documentation on NextJS Image optimisation

Jord-Gui commented 1 year ago

As per discussion with @amankumarrr, the Image Optimization API is not actually available for exported applications, per source Stack Overflow and NextJS documentation Image Figure: Stack overflow answer

Image Figure: NextJS documentation

@christianmorfordwaitessw has raised a potential solution to use the Next Image Export Optimizer npm package. Image Figure: npm site for next image export optimizer