- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.4k
 
Add image formats #27168
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
          
     Open
      
      
            caugner
  wants to merge
  14
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
6971-image-formats
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +639
        
        
          −0
        
        
          
        
      
    
  
  
     Open
                    Add image formats #27168
Changes from 3 commits
      Commits
    
    
            Show all changes
          
          
            14 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      e1e70dd
              
                Add image formats
              
              
                caugner be139cd
              
                Add new media top-level object to README
              
              
                caugner cfc75b4
              
                Merge branch 'main' into 6971-image-formats
              
              
                caugner e6eb726
              
                Merge branch 'main' into 6971-image-formats
              
              
                caugner 6381f06
              
                Chromium unshipped JPEG XL
              
              
                caugner fdf5942
              
                Remove GIF animation (same support as parent)
              
              
                caugner d74068b
              
                Add HEIC/HEIF bugs
              
              
                caugner 39ed6e2
              
                Rename HEIC to HEIF
              
              
                caugner 08676cd
              
                Refine Safari data for AVIF
              
              
                caugner 71439fb
              
                Safari doesn't support JPEG XL with animated images
              
              
                caugner aabc88e
              
                Add Edge/IE image format data
              
              
                caugner 9b5bc6e
              
                Add WebP subfeatures
              
              
                caugner cedc106
              
                Refine Opera data for WebP
              
              
                caugner a13d724
              
                Merge branch 'main' into 6971-image-formats
              
              
                caugner File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddbeck What do you think about this?
PS: Would it be better to move
/media/formats/imageto/media/image-formats, to avoid the unnecessary nesting?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess now I'm wondering what the
medianame space would contain that is not a format? Seems like maybe the top-level key could beformatsormedia-formats, withimagesas the next level. The only other thing we've discussed is video formats, right? So maybe the hypothetical future looks like this?Also note the pluralization there. Most everywhere else is plural (
elements,at-rules,builtins, etc.).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't answer the original question.
Some questions back to you:
"or" suggests that as long as it works in at least one of these, it qualifies as full support. What about something like
ico, where the primary use case is neither of the two? Do we make an exception for that?"correctly" seems pretty imprecise. How wold you know if it were incorrect? Maybe it'd be better to frame this as a set of specific expected characteristics (e.g., no distorted colors, shows transparency if applicable, aspect ratio corresponding to the image data, etc.) that we could "test" (procedurally if not programmatically)?
This is a place where some user research or testing would be good—to find out what developers think of when a format is "supported."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
media.imageswould be a good compromise, as it avoids the termscodecandformataltogether, and we can just use those terms where necessary in the individual feature's key and/or description.Good point, agree.
Agree that framing around expectation is better, so how about:
I don't think user research or further testing is justified at this time.
If we receive feedback that the data is incomplete, incorrect, or misleading, we can refine. Most likely we can address feedback by adding subfeatures, either under the media format, or under the feature that the specific use case or expectation relates to (cf. HTMLCanvasElement: toBlob() method).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddbeck Is the above an acceptable compromise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this gets at the heart of the matter for me: it's easy to add things but harder to take them away. If we're wrong we might hear about it, but if we're irrelevant, then we might never get any feedback (and maintain data for no real purpose). Indifference is a failure mode I care about as much as being correct—and perhaps more, in this particular case, given the potential costs of maintaining a deep matrix of support information.
I'm not asking for something heavy-weight here, but I think we should be able to point at something (some blog posts or Stack Overflow questions or social media posts would be enough) that shows that the definition of supported we're choosing matters (to anyone beyond some completionist tech writers 😅).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I don't mind that structure, but I worry a little about vagueness. "Media" gets used in lots of places (media queries, media devices, media streams, etc.) and I think being specific in some way would make this easier to talk about and maintain, if nothing else.