Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • Commento Commento
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 186
    • Issues 186
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 35
    • Merge requests 35
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CommentoCommento
  • CommentoCommento
  • Merge requests
  • !159

Fix twitter profile photo import bug

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Souradip Mookerjee requested to merge souramoo/commento:patch-1 into master Jun 17, 2020
  • Overview 2
  • Commits 2
  • Pipelines 1
  • Changes 1

The current implementation of the twitter profile image fetching results in a broken image bug. This occurs on both self-hosted Commento instances as well as Commento.io (https://demo.commento.io)

Fixes #323 (closed)

This is because, although the photo URL is correctly retrieved from twitter and stored, when trying to display the photo an extra ?size=normal is added.

This breaks the image because Twitter rejects the URL.

See: http://pbs.twimg.com/profile_images/1260286298239139854/2p_o7quE_normal.jpg (my photo) vs http://pbs.twimg.com/profile_images/1260286298239139854/2p_o7quE_normal.jpg?size=normal (no response)

Twitter API: https://developer.twitter.com/en/docs/accounts-and-users/user-profile-images-and-banners - the normal sized image is the one returned by default.

Edited Jun 17, 2020 by Souradip Mookerjee
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: patch-1