{"id":8438,"date":"2010-03-13T16:47:23","date_gmt":"2010-03-13T16:47:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/proportional-image-scaling\/"},"modified":"2016-05-22T16:36:15","modified_gmt":"2016-05-22T16:36:15","slug":"proportional-image-scaling","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/proportional-image-scaling\/","author":149308,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1","stable_tag":"1.1.1","tested":"4.5.33","requires":"2.0","requires_php":"","requires_plugins":"","header_name":"Proportional Image Scaling","header_author":"Markus Mayer","header_description":"","assets_banners_color":"","last_updated":"2016-05-22 16:36:15","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/proportional-image-scaling\/","header_author_uri":"http:\/\/blog.defx.de","rating":0,"author_block_rating":0,"active_installs":20,"downloads":4152,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1567302","resolution":"1","location":"plugin"}},"screenshots":{"1":"The settings menu."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[356,163,23138],"plugin_category":[50,59],"plugin_contributors":[89021],"plugin_business_model":[],"class_list":["post-8438","plugin","type-plugin","status-publish","hentry","plugin_tags-css","plugin_tags-images","plugin_tags-scaling","plugin_category-media","plugin_category-utilities-and-tools","plugin_contributors-sunside","plugin_committers-sunside"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/proportional-image-scaling.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/proportional-image-scaling\/trunk\/screenshot-1.png?rev=1567302","caption":"The settings menu."}],"raw_content":"<!--section=description-->\n<p>When a user inserts an image using the visual editor, Wordpress automatically sets the \nwidth and height attributes on the image tag. Unfortunately, when the images' width is\nlarger than the CSS \"max-width\" value, the width is capped but the height is not\naffected, leading to distorted images.\nThis plugin either removes all height and width tags from images of a given class \n(resulting in a correct \"max-width\" behavior) or scales them to a given width to assist \nbrowsers in creating the layout.<\/p>\n\n<h3>Known Limiations<\/h3>\n\n<ul>\n<li>Currently, only pixel values are supported when scaling.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p>Just drop the .php file into the plugins folder and activate it.\nIt should work fine out of the box.<\/p>\n\n<h4>Configuration<\/h4>\n\n<p>By default, the plugin removes all \"width\" and \"height\" attributes from images, that\ncontain the term \"wp-image-\" in their class.<\/p>\n\n<p>To enable proportional scaling, a width can be entered here. If this width is zero,\nscaling is disabled and the attributes are removed.<\/p>\n\n<p>Additionally, images can be selected by terms that appear in their class attribute.\nIt's a space separated list, so \"wp-image- foo\" will match against \"wp-image-\" and \"foo\".\nIf one of these terms is missing, the image is not processed.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Which width should I enter?<\/dt>\n<dd><p>When in doubt: 0.<\/p><\/dd>\n<dt>Whats difference does it make when I enter a width?<\/dt>\n<dd><p>If you enter a value of 0, the width and height attribute are removed. While this\nworks, it may be desirable to set these values in order to allow browsers to lay \nout the page before the images are loaded. Setting a width and height allows the \nplugin to scale these values so they fit int the design. \nIt's basically a setting for purists.<\/p><\/dd>\n<dt>Can I exclude images?<\/dt>\n<dd><p>Yes, by their CSS class.<\/p><\/dd>\n<dt>Can I disable the plugin on a per-post base?<\/dt>\n<dd><p>Yes, by adding <code>[disable_image_scaling]<\/code> anywhere in the post.<\/p><\/dd>\n<dt>After editing or changing my theme, the images are distorted again<\/dt>\n<dd><p>This might be due to the plugin's configuration. If a target width larger than zero, \nbut smaller than the (new) theme's max-width value is set, the images will be scaled \nto the given width. Then the max-width rule caps the width again, leading again to the \ndistortion. This is normal behavior; Either set the target width to zero in the plugins'\nsettings (this should be fail safe), or to the matching max-width value.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added class exclude setting<\/li>\n<li>Made the matching algorithm more robust to unexpected html.<\/li>\n<li>Added [disable_image_scaling] keyword support<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version<\/li>\n<\/ul>","raw_excerpt":"This plugin is an attempt to prevent distorted images when a CSS max-width rule is in effect and the image is inserted using the visual editor.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8438"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sunside"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8438"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8438"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8438"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8438"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8438"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}