Twitter/X - clickable links to images and show uncropped thumbnails

All image posts in Twitter/X Home, other blog streams and single post views link to the high-res "orig" version. Thumbnail images in the stream are modified to display uncropped.

A continuación se muestran las versiones de este script en las que se actualizó el código. Ver todas las versiones.

  • v4.3 21/5/2024

    Support x.com domain in addition to twitter.com.

    This seems to be working without requiring an significant changes to the script..
    However, future breakage might occur if Twitter/X moves further away from the old Twitter domains (like the image hosting domain twimg.com).

  • v4.2 29/9/2023

    Attempt to handle Twitter WebP image URLs with Chromium-based browsers, as well.

  • v4.1 12/9/2023
  • v4.0.1 12/9/2023

    typo

  • v4.0 12/9/2023

    Handle "webp" images for which their originally uploaded image was NOT of type "webp".

    Twitter/X seems to be using some A/B Testing (Optimizely, Wikipedia) regarding images.

    Some users receive embedded images coded as webp (smaller size = more efficient) even if the originally uploaded image was of another type (like jpg or png).
    This makes it hard for the script to determine the link to the original image.

    I as author of this script currently seem to be in the "B" group - I do not receive any "webp" images!
    Nonetheless, I've developed a new version if this script (4.0) to try to deal with this "webp" scenario - but full validation testing is obviously difficult...

    I ask for all who are in the "A" group - i.e. all who do receive "webp" images - to please test this script and to provide extensive feedback if things do break...

  • v3.2 7/11/2022

    small refinement to not fail on cross-site CSS style sheets when unblurring posts

  • v3.1 27/8/2022

    fixed removal of image blurring
    (It seems Twitter/React now loads some styles on-demand, invalidating my prior caching approach)

  • v3.0 19/2/2022

    Remove blur effects and "sensitive Content" warnings - this was developed and tested for those posts where this warning appears even if it has been switched off in the Profile Settings.
    Support for Old Twitter UI has been removed.

  • v2.5 9/9/2020 Fix context menu items specific to images not appearing for single-image posts ("View Image", "Save Image As", entries added by add-ons, etc.). Many Thanks to 四葉シグレ for reporting the issue!
  • v2.4 30/7/2020 Some thumbnails were not getting resized correctly anymore - fixed
  • v2.3.2 8/3/2020
  • v2.3.1 7/1/2020 remove commented out code - will not reenable capability of thumbs to resize themselves (too many side-effects)
  • v2.3.0 26/9/2019 Twitter significantly changed the internal logic for 2x and 4x image posts -> disable height resizing -> back to keeping post heights as original and resizing thumbnails to display uncropped within the available height -> i.e. images get smaller as the resize -> as a positive side effect, this removes any "bumpyness" in scrolling back up
  • v2.2.0 6/8/2019 images are resized to their maximum height while respecting aspect ratio and available width
  • v2.1.0 6/8/2019 Apply to single image posts (URL: .../status/...) and apply script more reliably on stream views
  • v2.0.1 26/7/2019 no function change - update to description, only
  • v2.0.0 25/7/2019 Major update to support new Twitter UI
  • v1.1.1 6/1/2019 FIXED: null-pointer exception - bug had no negative effect but was slightly embrassing
  • v1.1.0 5/1/2019 ADDED: uncrop thumbnails - ADDED: apply script to post displayed in overlay - FIXED: various typos in comments and some minor code cleanup
  • v1.0.0 30/12/2018
  • v1.0.0 30/12/2018
  • v1.0.0 30/12/2018