From @lauriii in Slack

ImageOptim says still that most of the images could be further optimized

Note that the logo.svg has some intentional whitespace included in it, and should not be optimized.

Issue fork drupal-3176852

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mherchel created an issue. See original summary.

Pooja Ganjage’s picture

StatusFileSize
new2.19 KB

Hi,

I am creating a patch for this issue.

Please review the patch.

Let me know for any suggestions.

Thanks.

Pooja Ganjage’s picture

Status: Active » Needs review
mherchel’s picture

Status: Needs review » Needs work

@Pooja Ganjage I only see that you changed the logo.svg. We need to optimize the other SVGs (rather than the logo).

Please include screenshots of the various SVGs in use after they're optimized to ensure there are no regressions. Also, please let us know what tool you used to optimize them.

mherchel’s picture

Title: (re)Ensure that all SVGs are optimized. » (re)Ensure that all of Olivero's SVGs are optimized.
Project: Olivero » Drupal core
Version: 8.x-1.x-dev » 9.1.x-dev
Component: Code » Olivero theme
Priority: Normal » Minor
kishor_kolekar’s picture

Assigned: Unassigned » kishor_kolekar
kishor_kolekar’s picture

Assigned: kishor_kolekar » Unassigned
raman.b’s picture

Status: Needs work » Needs review
StatusFileSize
new15.41 KB
new84.44 KB

ImageOptim reports the following SVGs for optimizations:

raman.b’s picture

Status: Needs review » Needs work
Issue tags: +Needs screenshots

NW for screenshots

kiran.kadam911’s picture

Version: 9.1.x-dev » 9.3.x-dev
Status: Needs work » Needs review
StatusFileSize
new13.24 KB
new294.91 KB

Providing updated patch with re-rolled 9.3.x

Kindly review.

Gulp SVG image optimization report:

Thanks!

mitthukumawat’s picture

Patch #10 applied cleanly for me and all the SVGs got optimized.

chetanbharambe’s picture

StatusFileSize
new412.26 KB
new463.02 KB
new208.82 KB

Verified and tested patch #10.
Patch applied successfully and looks good to me.

Testing Steps:
# Install Olivero theme
# Download the patch
# Run the command - ls -al (to check the size of SVGs)
# Apply the patch
# Run the command - ls-al (to check the updated size of SVGs)

Expected Results:
# User should see the expected size of SVGs

Actual Results:
# Currently User is able to see the size of SVGs but the size is maximum.

Note: Can be a move to +1 RTBC

chetanbharambe’s picture

Status: Needs review » Reviewed & tested by the community

Removing the duplicate comments [Ignore]

chetanbharambe’s picture

.

chetanbharambe’s picture

Status: Reviewed & tested by the community » Needs review
kiran.kadam911’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work

This patch does not apply to 9.3.x - we need to reoptimise the images in that branch...

error: patch failed: core/themes/olivero/images/chevron-down.svg:1
error: core/themes/olivero/images/chevron-down.svg: patch does not apply
error: patch failed: core/themes/olivero/images/search.svg:1
error: core/themes/olivero/images/search.svg: patch does not apply
error: core/themes/olivero/images/select-chevron-bg-default.svg: does not exist in index
error: core/themes/olivero/images/select-chevron-bg-error.svg: does not exist in index
error: core/themes/olivero/images/select-chevron-bg-highlight.svg: does not exist in index

xjm’s picture

Priority: Minor » Normal

This is a performance and scalability issue, so at least normal and maybe higher depending on the performance impact.

We never really set standards for frontend performance (aside from "any changes should have before-and-after size and number of aggregates posted" which I can't remember the last time I saw in practice), but saving an entire KB seems pretty good, all things considered.

xjm’s picture

Issue tags: +frontend performance

Gauravmahlawat made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review

bnjmnm made their first commit to this issue’s fork.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andy-blum’s picture

Status: Needs review » Needs work

Needs re-roll/rebase

_utsavsharma’s picture

Status: Needs work » Needs review
StatusFileSize
new13.73 KB

Rerolled for 10.1.x.
Please review.

Manoj Raj.R’s picture

StatusFileSize
new53.07 KB

#23 looks good to me other than rebase as mentioned by #27.

+1 RTBC after re-roll/rebase

andy-blum’s picture

Status: Needs review » Needs work
StatusFileSize
new296.26 KB
new19.66 KB
new21.47 KB
new12.52 KB

@Manoj Raj.R - Screenshots of diffs are not helpful. The patch provides the diff, and the automated testing alerts us to problems like the patch not applying. For this specific issue, screenshots of the reduced filesize, and of the SVGs in use are what is needed to move the issue forward.

@_utsavsharma - Thank you for the updated patch, necessary screenshots are below.

Updated file sizes:

screenshot of old and new icons in mac finder, showing filesizes

Old vs new icons on various backgrounds:

screenshot of icons in use on white background
 
screenshot of icons in use on gray background
 
screenshot of icons in use on black background

One issue I am noticing is that we're removing the viewbox attribute in favor of the width & height attributes. I'm not sure that's the way to go as it can interfere with the SVG's internal aspect ratio, causing icons to be clipped when the X/Y dimensions are overridden by CSS.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Olivero theme was approved for removal in #3590816: [policy, no patch] Deprecate Olivero and move to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3595082: [meta] Tasks to deprecate the Olivero theme and the removal work in #3595085: [meta] Tasks to remove the Olivero theme.

quietone’s picture

Project: Drupal core » Olivero
Version: main » 2.0.0
Component: Olivero theme » Code
quietone’s picture

Status: Postponed » Needs work
quietone’s picture

Version: 2.0.0 » 2.x-dev