Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
2 tasks done
Tracked by #80
Jord-Gui opened this issue Oct 11, 2023 · 2 comments · Fixed by #79
Closed
2 tasks done
Tracked by #80

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

Jord-Gui opened this issue Oct 11, 2023 · 2 comments · Fixed by #79
Labels
Area: Frontend Relates to frontend development e.g. Angular, React, XAML etc Type: Bug A problem with existing functionality Type: Refactor A code quality improvement e.g. Tech debt

Comments

@Jord-Gui
Copy link
Member

Jord-Gui commented Oct 11, 2023

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

Preview Give feedback
@Jord-Gui Jord-Gui added Area: Frontend Relates to frontend development e.g. Angular, React, XAML etc Type: Bug A problem with existing functionality Type: Refactor A code quality improvement e.g. Tech debt labels Oct 11, 2023
@Jord-Gui
Copy link
Member Author

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
Copy link
Member Author

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

Jord-Gui added a commit that referenced this issue Oct 15, 2023
<!-- describe the change, why is it needed and what does it accomplish
as per https://ssw.com.au/rules/write-a-good-pull-request/ -->

Fixes #75 

<!-- Add done video, screenshots as per
https://ssw.com.au/rules/record-a-quick-and-dirty-done-video/-->
Added a step in the build process to convert jpg/png to webp.
<img width="811" alt="image"
src="https://github.com/SSWConsulting/SSW.Dory/assets/41951199/dc8e717f-bd98-4175-960b-24fcb8a0b242">
**Figure: Images now in webp format**

<!-- As per rule https://www.ssw.com.au/rules/over-the-shoulder-prs -->
<!-- Getting the PR merged is part of the task - Call someone to review
your changes to get them merged ASAP -->
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: Frontend Relates to frontend development e.g. Angular, React, XAML etc Type: Bug A problem with existing functionality Type: Refactor A code quality improvement e.g. Tech debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant