Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

LG-3769: Optimize image assets #4635

Merged
merged 5 commits into from
Feb 2, 2021
Merged

LG-3769: Optimize image assets #4635

merged 5 commits into from
Feb 2, 2021

Conversation

aduth
Copy link
Member

@aduth aduth commented Feb 1, 2021

Why: As a user, I want images to be as small file size as possible, so that pages load fast.

Impact:

Click to expand SVG results webauthn-verified.svg: Done in 23 ms! 0.813 KiB - 45.4% = 0.444 KiB

state-id-round.svg:
Done in 57 ms!
6.769 KiB - 0.5% = 6.735 KiB

scissors.svg:
Done in 13 ms!
1.394 KiB - 12.7% = 1.217 KiB

globe-white.svg:
Done in 9 ms!
1.124 KiB - 13.6% = 0.972 KiB

ico-copy.svg:
Done in 4 ms!
0.53 KiB - 21.5% = 0.416 KiB

2FA-voice.svg:
Done in 25 ms!
4.48 KiB - 4.7% = 4.269 KiB

pkey-block.svg:
Done in 6 ms!
0.825 KiB - 15.5% = 0.697 KiB

warning.svg:
Done in 4 ms!
0.589 KiB - 22.4% = 0.457 KiB

shield.svg:
Done in 2 ms!
0.42 KiB - 25.8% = 0.312 KiB

user.svg:
Done in 2 ms!
0.449 KiB - 43% = 0.256 KiB

email.svg:
Done in 9 ms!
1.153 KiB - 17.1% = 0.956 KiB

close-white-alt.svg:
Done in 1 ms!
0.245 KiB - 29.1% = 0.174 KiB

globe-blue.svg:
Done in 5 ms!
1.126 KiB - 13.4% = 0.975 KiB

ico-refresh.svg:
Done in 7 ms!
0.752 KiB - 19.6% = 0.604 KiB

verified.svg:
Done in 4 ms!
0.795 KiB - 39.3% = 0.482 KiB

icon-lock-alert-important.svg:
Done in 9 ms!
2.405 KiB - 58.7% = 0.994 KiB

check-email.svg:
Done in 17 ms!
2.083 KiB - 15.8% = 1.753 KiB

lock.svg:
Done in 5 ms!
0.444 KiB - 43.3% = 0.252 KiB

warning.svg:
Done in 2 ms!
0.513 KiB - 38.7% = 0.314 KiB

icon-lock-alert-important.svg:
Done in 4 ms!
2.405 KiB - 58.7% = 0.994 KiB

forgot.svg:
Done in 36 ms!
2.093 KiB - 15.3% = 1.772 KiB

fail-lg.svg:
Done in 60 ms!
1.548 KiB - 18.4% = 1.263 KiB

temp-lock.svg:
Done in 6 ms!
1.828 KiB - 24.6% = 1.378 KiB

fail-x.svg:
Done in 8 ms!
1.567 KiB - 16.9% = 1.302 KiB

success.svg:
Done in 2 ms!
0.462 KiB - 42.5% = 0.266 KiB

warning-lg.svg:
Done in 9 ms!
1.67 KiB - 17.1% = 1.385 KiB

error.svg:
Done in 2 ms!
0.373 KiB - 50.8% = 0.184 KiB

unphishable.svg:
Done in 6 ms!
0.943 KiB - 46.3% = 0.507 KiB

ico-download.svg:
Done in 37 ms!
2.89 KiB - 66.5% = 0.967 KiB

plus.svg:
Done in 10 ms!
0.755 KiB - 4% = 0.725 KiB

icon-dot-gov.svg:
Done in 5 ms!
0.781 KiB - 11.9% = 0.688 KiB

piv-cac-round.svg:
Done in 52 ms!
6.773 KiB - 0.4% = 6.744 KiB

security-key.svg:
Done in 56 ms!
7.033 KiB - 13.8% = 6.06 KiB

come-back.svg:
Done in 63 ms!
6.463 KiB - 24% = 4.909 KiB

square-gsa-dark.svg:
Done in 7 ms!
3.102 KiB - 67% = 1.024 KiB

square-gsa.svg:
Done in 10 ms!
2.191 KiB - 55.8% = 0.969 KiB

18f.svg:
Done in 10 ms!
1.341 KiB - 32.7% = 0.902 KiB

generic.svg:
Done in 3 ms!
1.167 KiB - 51.4% = 0.567 KiB

user-signup-ial1.svg:
Done in 49 ms!
20.646 KiB - 62.4% = 7.768 KiB

clock.svg:
Done in 17 ms!
2.327 KiB - 24.4% = 1.759 KiB

ico-print.svg:
Done in 3 ms!
0.591 KiB - 20.7% = 0.469 KiB

icon-https.svg:
Done in 3 ms!
0.396 KiB - 4.9% = 0.377 KiB

user-signup-ial2.svg:
Done in 73 ms!
22.466 KiB - 65.9% = 7.665 KiB

id-card.svg:
Done in 21 ms!
3.692 KiB - 64.6% = 1.307 KiB

user-access.svg:
Done in 80 ms!
23.18 KiB - 30% = 16.217 KiB

sign-in.svg:
Done in 2 ms!
0.625 KiB - 32.5% = 0.422 KiB

p-key.svg:
Done in 4 ms!
1.289 KiB - 18% = 1.058 KiB

logo.svg:
Done in 10 ms!
2.189 KiB - 24.2% = 1.659 KiB

carat-right.svg:
Done in 2 ms!
0.446 KiB - 27.8% = 0.322 KiB

financial.svg:
Done in 15 ms!
2.205 KiB - 19.1% = 1.783 KiB

email-password.svg:
Done in 8 ms!
3.713 KiB - 47% = 1.968 KiB

2FA.svg:
Done in 18 ms!
2.776 KiB - 19.5% = 2.236 KiB

personal-details.svg:
Done in 8 ms!
1.995 KiB - 13.8% = 1.721 KiB

ID.svg:
Done in 8 ms!
5.064 KiB - 54.5% = 2.305 KiB

minus.svg:
Done in 2 ms!
0.597 KiB - 49.9% = 0.299 KiB

logo-white.svg:
Done in 9 ms!
2.169 KiB - 24.7% = 1.633 KiB

safari-pinned-tab.svg:
Done in 8 ms!
1.111 KiB - 33.9% = 0.734 KiB

logo.svg:
Done in 20 ms!
5.155 KiB - 68.1% = 1.644 KiB

logo-white.svg:
Done in 22 ms!
5.155 KiB - 68.6% = 1.617 KiB

Click to expand PNG results
app/assets/images/idv/bar_code.png 2.74kb 2.41kb -12%
app/assets/images/idv/phone.png 5.89kb 1.91kb -68%
app/assets/images/idv/switch.png 5.21kb 1.0kb -81%
app/assets/images/logo.png 6.34kb 3.61kb -43%
app/assets/images/state-id-confirm@3x.png 17.86kb 14.55kb -19%
app/assets/images/us-flag.png 0.28kb 0.13kb -54%
public/apple-touch-icon.png 3.81kb 3.02kb -21%
public/favicon-16x16.png 0.91kb 0.56kb -38%
public/favicon-32x32.png 1.33kb 0.93kb -32%
public/mstile-150x150.png 3.66kb 3.11kb -15%

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

aduth added 2 commits February 1, 2021 13:52
**Why**: Bug with SVGO removes keyframes. Comments are ignored by default, which are necessary for allowable exceptions to SVG inline styles. SVGO's `removeComments` will preserve comments prefixed with an exclamation point.

See: svg/svgo#888
See: https://github.com/svg/svgo/blob/master/plugins/removeComments.js
@aduth aduth merged commit c34482a into master Feb 2, 2021
@aduth aduth deleted the aduth-lg-3769-optimize-svg branch February 2, 2021 13:34
mitchellhenke added a commit that referenced this pull request Feb 4, 2021
* Make AgencySeeder ignore the abbreviation attribute (#4617)

Temporarily ignore the abbreviation attribute in agencies.yml to allow
the config repo updates to be merged without breaking the IdP while we
work on adding the Partnerships data model to the IdP schema. We will
ultimately add the attribute to the `agencies` table and at that point
remove this change.

Also updates the localdev template YAML file and adds an explicit
fixture file for testing, which is passed to the service object through
dependency injection.

* Add feature flag to send partial DOB to LexisNexis (LG-3706) (#4613)

* Bump identity-proofer-gem to get Proofer::Result#transaction_id (#4624)

* LG-4129: Add test case for cancelled IAL2 session (#4621)

**Why**: Follow-up task from #4620 (comment)

* LG-4097: Fix "Submit" button always appearing disabled on document capture review step (#4623)

* Omit unknown errors when considering to allow step continue

**Why**: Active errors contains both field-specific and general messages, e.g. received from a failed validation attempt. The latter will never become unresolved by changing field values. Only disable continue if the step is invalid OR if there are field-specific errors yet to be addressed.

* Add ReviewIssuesStep validator

* Fix lint error

* Merge 3rd and 4th screens in mobile IAL2 flow (LG-3962) (#4626)

* placeholder

* remove mobile intro step

* Update app/javascript/packages/document-capture/components/document-capture.jsx

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>

* update comment and remove unnecessary text

* remove new line

* fix merge

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>

* Move phone internationalization scripts to intl-tel-input pack (#4622)

**Why**: Reduce size of main application bundle, which is loaded in all paths. Phone validation dependencies are quite large, and are only used in the context of the intl-tel-input pack (screens with phone input).

* Add separate feature flag to disable VOIP checks entirely (#4629)

* Retire the remote settings tooling (#4619)

The remote setting tooling was added at a time when `service_providers.yml` was tracked in the IdP codebase. At that time it was not possible to update the configs for a service provider without changing the IdP code and deploying a new sha. With identity-idp-config, this is no longer true.

This commit removes the code since now we can modify service provider configs by updating identity-idp-config and recycling to apply the changes.

* Drop doc_captures table (#4519)

**Why**: Because after #4508 is merged, we won't be using this table. We will be using document_capture_sessions instead.

* LG-4114 Log Async Timeout events (#4618)

* remove access rejected when capturing video (#4636)

* LG-3769: Optimize image assets (#4635)

* Add image optimization lint task

* Remove "data-name" attribute from SVG

* Optimize images

* Restore keyframes to ID card SVG

**Why**: Bug with SVGO removes keyframes. Comments are ignored by default, which are necessary for allowable exceptions to SVG inline styles. SVGO's `removeComments` will preserve comments prefixed with an exclamation point.

See: svg/svgo#888
See: https://github.com/svg/svgo/blob/master/plugins/removeComments.js

* Compress PNG images

* Update lambda ref to get x-ray tracing functionality (#4637)

* remove aal field from service_provider (LG-4119) (#4612)

* remove aal field from service_provider

* make remove_column reversible

* Fix image upload 500 (LG-4154) (#4640)

* add specs

* do not attempt throttling if document capture session does not exist

* do not raise exception on null byte in OIDC token code (#4641)

* Remove migration that drops the AAL column (#4642)

* Revert "remove aal field from service_provider (LG-4119) (#4612)"

This reverts commit c9ce970.

* Add AAL to the ignored column

**Why**: We will be dropping this column in a future commit

* Update proofer gem (#4646)

**Why**: This version includes support for non-string attributes

Co-authored-by: Oren Kanner <oren.kanner@gsa.gov>
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Co-authored-by: Jonathan Hooper <jonathan.hooper@gsa.gov>
Co-authored-by: Steve Urciuoli <steve.urciuoli@gsa.gov>
Co-authored-by: Doug Price <douglas.price@gsa.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants