{"id":8414,"date":"2010-03-12T03:42:51","date_gmt":"2010-03-12T03:42:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-image-sizes\/"},"modified":"2011-01-27T16:27:19","modified_gmt":"2011-01-27T16:27:19","slug":"custom-image-sizes","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/custom-image-sizes\/","author":27544,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0","stable_tag":"1.0","tested":"3.1.4","requires":"2.9","requires_php":"","requires_plugins":"","header_name":"Custom Image Sizes","header_author":"Austin Matzko","header_description":"","assets_banners_color":"","last_updated":"2011-01-27 16:27:19","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/austinmatzko.com\/wordpress-plugins\/filosofo-custom-image-sizes\/","header_plugin_uri":"http:\/\/ilfilosofo.com\/blog\/wordpress-plugins\/filosofo-custom-image-sizes\/","header_author_uri":"http:\/\/ilfilosofo.com","rating":5,"author_block_rating":0,"active_installs":200,"downloads":6257,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2260,133,163,1326,2956],"plugin_category":[50],"plugin_contributors":[77682],"plugin_business_model":[],"class_list":["post-8414","plugin","type-plugin","status-closed","hentry","plugin_tags-crop","plugin_tags-image","plugin_tags-images","plugin_tags-thumbnail","plugin_tags-thumbnails","plugin_category-media","plugin_contributors-filosofo","plugin_committers-filosofo"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/custom-image-sizes.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Custom Image Sizes is a WordPress plugin that<\/p>\n\n<ul>\n<li>generates the correctly-sized version of an image's thumbnail, if it doesn't already exist.<\/li>\n<li>lets you specify custom sizes with a size parameter of <code>'[width]x[height]'<\/code>.<\/li>\n<\/ul>\n\n<p>Read more at the <a href=\"http:\/\/austinmatzko.com\/wordpress-plugins\/filosofo-custom-image-sizes\/\">Custom Image Sizes<\/a> page.<\/p>\n\n<h3>Usage<\/h3>\n\n<h4>The typical WordPress way<\/h4>\n\n<ul>\n<li>Put <code>add_image_size( 'my_custom_thumbnail_name', 220, 130, true );<\/code> in your theme\u2019s functions.php file.<\/li>\n<li>Add the code to display that attachment\u2019s thumbnail where you want it to appear: <code>echo wp_get_attachment_image($attachment_id, 'my_custom_thumbnail_name');<\/code><\/li>\n<li>Unlike WordPress by itself, Custom Image Sizes will generate the thumbnail for an image, even if the image was uploaded before this <code>add_image_size()<\/code> was set.<\/li>\n<\/ul>\n\n<h4>A more direct Custom Image Sizes way<\/h4>\n\n<ul>\n<li><p>Call <code>wp_get_attachment_image_src()<\/code> or <code>wp_get_attachment_image()<\/code> with the desired thumbnail <code>'[width]x[height]'<\/code> dimensions, like so:<\/p>\n\n<pre><code>  echo wp_get_attachment_image($attachment_id, '220x80');\n\n  \/**\n   * The above prints markup like\n   * &lt;img width=\"220\" height=\"80\" title=\"\" alt=\"\"\n   *    class=\"attachment-220x80\" src=\"http:\/\/www.example.com\/path-to-file\/something-220x80.jpg\" \/&gt;\n   *\/\n<\/code><\/pre><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>filosofo-custom-image-sizes\/<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>","raw_excerpt":"Custom Image Sizes lets you specify exactly the size in which to display an attachment.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8414"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/filosofo"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8414"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8414"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8414"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8414"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8414"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}