이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Proportional Image Scaling

설명

When a user inserts an image using the visual editor, WordPress automatically sets the
width and height attributes on the image tag. Unfortunately, when the images’ width is
larger than the CSS “max-width” value, the width is capped but the height is not
affected, leading to distorted images.
This plugin either removes all height and width tags from images of a given class
(resulting in a correct “max-width” behavior) or scales them to a given width to assist
browsers in creating the layout.

Known Limiations

  • Currently, only pixel values are supported when scaling.

스크린샷

설치

Just drop the .php file into the plugins folder and activate it. It should work fine out of the box.

Configuration

By default, the plugin removes all “width” and “height” attributes from images, that contain the term “wp-image-” in their class.

To enable proportional scaling, a width can be entered here. If this width is zero, scaling is disabled and the attributes are removed.

Additionally, images can be selected by terms that appear in their class attribute. It’s a space separated list, so “wp-image- foo” will match against “wp-image-” and “foo”. If one of these terms is missing, the image is not processed.

FAQ

Which width should I enter?

When in doubt: 0.

Whats difference does it make when I enter a width?

If you enter a value of 0, the width and height attribute are removed. While this
works, it may be desirable to set these values in order to allow browsers to lay
out the page before the images are loaded. Setting a width and height allows the
plugin to scale these values so they fit int the design.
It’s basically a setting for purists.

Can I exclude images?

Yes, by their CSS class.

Can I disable the plugin on a per-post base?

Yes, by adding [disable_image_scaling] anywhere in the post.

After editing or changing my theme, the images are distorted again

This might be due to the plugin’s configuration. If a target width larger than zero,
but smaller than the (new) theme’s max-width value is set, the images will be scaled
to the given width. Then the max-width rule caps the width again, leading again to the
distortion. This is normal behavior; Either set the target width to zero in the plugins’
settings (this should be fail safe), or to the matching max-width value.

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“Proportional Image Scaling”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Proportional Image Scaling”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.1

  • Added class exclude setting
  • Made the matching algorithm more robust to unexpected html.
  • Added [disable_image_scaling] keyword support

1.0

  • Initial version