Skip to content

I rewrote the plugin #89

Open
Open

Description

@soderlind

Available at https://github.com/soderlind/tachyon-edge-images (latest: 0.2.1)

Compared with the current upstream plugin, Tachyon Edge Images addresses these open issues:

Upstream issue Outcome
humanmade/tachyon-plugin#85 — invalid attachment warnings Fixed: missing image-source results are checked before use. See Content.php. Since 0.2.1, attachment metadata without width/height is treated as missing too, so image_downsize no longer warns. See Downsize.php.
humanmade/tachyon-plugin#84 — block-editor REST requests Fixed: editor requests receive origin URLs instead of Tachyon-resized URLs. See Rest.php.
humanmade/tachyon-plugin#61 — arguments dropped from existing Tachyon URLs Opt-in fix: TACHYON_EDGE_IMAGES_EXTEND_TACHYON_URLS. See Url.php.
humanmade/tachyon-plugin#43 — stripping image dimensions from file name Opt-in fix (0.2.1): TACHYON_EDGE_IMAGES_KEEP_UNATTACHED_FILENAMES. An image in post content that is not in the Media Library keeps its -WxH ending, so an original named photo-900x600.jpg is no longer rewritten to photo.jpg. See Content.php.
humanmade/tachyon-plugin#23 — certain characters break Tachyon URLs when encoded Opt-in fix (0.2.1): TACHYON_EDGE_IMAGES_PRESERVE_AT_SIGN. photo@2x.jpg stays photo@2x.jpg instead of photo%402x.jpg. See Url.php.

The opt-in fixes change URLs that existing sites may depend on, so they are off by default:

define( 'TACHYON_EDGE_IMAGES_EXTEND_TACHYON_URLS', true );
define( 'TACHYON_EDGE_IMAGES_KEEP_UNATTACHED_FILENAMES', true );
define( 'TACHYON_EDGE_IMAGES_PRESERVE_AT_SIGN', true );

Each also has a filter (tachyon_edge_images_extend_tachyon_urls, tachyon_edge_images_keep_unattached_filenames, tachyon_edge_images_preserve_at_sign) to decide per URL or per image.

Tachyon Edge Images also includes the link-rewriting and size-detection fixes proposed in humanmade/tachyon-plugin#88, and prevents double encoding of already-encoded file names.

Should I create a PR, ie add my changes here?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions