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

(minor) Inconsistent format of screenshot-thumbnails and final-screenshot #7092

Closed
alekseykulikov opened this issue Jan 25, 2019 · 2 comments

Comments

@alekseykulikov
Copy link
Contributor

What is the current behavior?

It's a minor inconsistency, but screenshot-thumbnails and final-screenshot have the same type of data but in different format.

{
  "screenshot-thumbnails": {
     "details": {
       "items": [
          {
            "timing": 3335,
            "timestamp": 7104511246,
            "data": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
          }
        ]
     }
  },
  "final-screenshot": {
     "details": {
        "type": "screenshot",
        "timestamp": 7104882.46,
        "data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
      }
   }
}

What is the expected behavior?

It would be better to have the new final-screenshot in the same format as screenshot-thumbnails:

  • data is a valid base64 encoded jpeg (remove data:image/jpeg;base64,)
  • timing contains the actual value
  • timestamp in the same scale as other timestamps (timestamp * 1000)

Environment Information

  • Lighthouse version: 4.0.0
@patrickhulce
Copy link
Collaborator

Thanks for pointing this out @alekseykulikov! Unfortunately we already have consumers relying on the format in final-screenshot :/

Maybe we can put this into 5.0...

Based on the review it looks like it started out as the same as our filmstrip but changed formats before landing. @brendankenny do you recall if there was a PSI reason that prompted the switch?

@patrickhulce
Copy link
Collaborator

Fixed by #8299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants