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

feat: add info about where to put SVG assets #37824

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Jan 27, 2025

Description

Most of the work to remove binary assets is done in the HTTP section.
This PR adds some hints about using SVG for diagrams, where to put them, and how they're included in content.

Motivation

Closing out the discussion with a recommendation for using SVG in shared assets.

@bsmth bsmth requested a review from a team as a code owner January 27, 2025 12:03
@bsmth bsmth requested review from hamishwillee and removed request for a team January 27, 2025 12:03
@github-actions github-actions bot added Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed labels Jan 27, 2025
Copy link
Contributor

Preview URLs

External URLs (1)

URL: /en-US/docs/MDN/Writing_guidelines/Howto/Images_media
Title: How to add images and media

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -6,6 +6,21 @@ page-type: mdn-writing-guide

{{MDNSidebar}}

## Adding SVGs
Copy link
Collaborator

Choose a reason for hiding this comment

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

The text itself is more or less fine, but it feels structurally odd/out of place:

  • SVG is an image so how does Adding SVGs differ/relate to the following topic on Adding Images
  • Do the rules in Adding images apply to this or not?
  • Do the instructions for shared assets also apply to other types of content? What are the recommendations for shared content - should we have every image in the shared repo, or just those that we intend to be shared.

My thinking on this is that

  • all the image topics should be grouped under an "IMages" heading.
    • The content on SVGs should be image guidelines at the top of that section and we should generally suggest SVG for line/vector images, and PNG or WebP for other image types.
  • The "Adding images" should become "Adding images locally"
  • The Adding to shared assets should appear after adding images locally at the same level.

Structurally that groups like-topics. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants