{"id":15040363,"url":"https://github.com/automattic/wpcom-thumbnail-editor","last_synced_at":"2025-10-19T18:32:47.510Z","repository":{"id":46275040,"uuid":"53623801","full_name":"Automattic/wpcom-thumbnail-editor","owner":"Automattic","description":"Since thumbnails are generated on-demand on WordPress.com, thumbnail cropping location must be set via the URL.","archived":false,"fork":false,"pushed_at":"2023-01-16T06:05:19.000Z","size":2748,"stargazers_count":10,"open_issues_count":5,"forks_count":10,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-01-30T01:12:25.091Z","etag":null,"topics":["wordpress","wordpress-plugin","wpvip-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Automattic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-10T23:08:07.000Z","updated_at":"2024-05-22T14:11:51.000Z","dependencies_parsed_at":"2023-02-10T01:30:37.070Z","dependency_job_id":null,"html_url":"https://github.com/Automattic/wpcom-thumbnail-editor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fwpcom-thumbnail-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fwpcom-thumbnail-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fwpcom-thumbnail-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fwpcom-thumbnail-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Automattic","download_url":"https://codeload.github.com/Automattic/wpcom-thumbnail-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237200430,"owners_count":19271140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress","wordpress-plugin","wpvip-plugin"],"created_at":"2024-09-24T20:44:32.577Z","updated_at":"2025-10-19T18:32:42.108Z","avatar_url":"https://github.com/Automattic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wpcom-thumbnail-editor\nSince thumbnails are generated on-demand on WordPress.com, thumbnail cropping location must be set via the URL.\n\nThis plugin adds a \"Show Thumbnails\" button on the attachment Edit screen (wp-admin/post.php?post=123\u0026action=edit) where individual image subsizes can be selected and cropped.\n\n**NOTE: The plugin is not maintained and should be considered deprecated.**\n\n### WordPress VIP\n\nThere is a [beta release](https://github.com/Automattic/wpcom-thumbnail-editor/releases/tag/1.0.2-wpvip-beta) validated for WPVIP.com compatibility as of November, 2022. Thanks to Ben May @ The Code Company for the contribution to this release.\n\n### What does this plugin do?\n\nThe plugin provides a helpful interface for direct control over the look of your thumbnail images. Select the crop location and portion of the fullsize image you'd like to use and the plugin takes care of the rest.\n\n### How do I set it up?\n\nAfter you've activated the plugin, edit any image, and you'll see a new \"Show Thumbnails\" button:\n\n![Thumbnail button](thumbnail-button.png)\n\nWhen you click the thumbnail to edit, you'll be taken to a screen where you can crop your image:\n\n![Crop](crop.png)\n\n### Ratio Mapping Support\n\nIf you have 10 different 3:2 images and you want to apply the same crop to them all, you have to edit each one individually. The plugin supports ratio mapping, which is like saying \"all these add\\_image\\_size definitions belong together\". Instead of having the user edit every single thumbnail, they only need to edit one image per ratio definition.\n\nPhoton is smart enough so that you can save the same coordinates for each image definition and have it output a cropped result that is proportionate. When the user saves one image for a given ratio, it looks at the image ratio map and just updates the meta value so it applies to all the similar crops for that image.\n\nHere's how you can define a custom image map:\n\n    add_filter( 'wpcom_thumbnail_editor_args', function( $args ) {\n    \t$args['image_ratio_map'] = array(\n    \t\t'3:2' =\u0026gt; array(\n    \t\t\t'150x100',\n    \t\t\t'loop-thumbnail',\n    \t\t\t'slider-thumbnail',\n    \t\t),\n    \t\t'16:9' =\u0026gt; array(\n    \t\t\t'slider-wide',\n    \t\t\t'post-header',\n    \t\t)\n    \t);\n\n    \treturn $args;\n    } );\n\nThe structure of the image\\_ratio\\_map looks something like:\n\n    array(\n    \t'ratio-name' =\u0026gt; array(\n    \t\t'image-size-name',\n    \t),\n    );\n\nIf the image\\_ratio\\_map is not defined, the plugin will just default to standard behavior, which is individual crops for all image sizes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fwpcom-thumbnail-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomattic%2Fwpcom-thumbnail-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fwpcom-thumbnail-editor/lists"}