Title: Proportional Image Scaling
Author: sunside
Published: <strong>13. mars, 2010</strong>
Last modified: 22. mai, 2016

---

Søk i utvidelser

Denne utvidelsen **har ikke blitt testet mot noen av de siste 3 hovedutgivelsene
av WordPress**. Den er kanskje ikke lenger holdt vedlike eller støttet, og den kan
ha kompatibilitetsproblemer med nyeste versjoner av WordPress.

![](https://s.w.org/plugins/geopattern-icon/proportional-image-scaling.svg)

# Proportional Image Scaling

 Av [sunside](https://profiles.wordpress.org/sunside/)

[Last ned](https://downloads.wordpress.org/plugin/proportional-image-scaling.1.1.1.zip)

 * [Detaljer](https://nb.wordpress.org/plugins/proportional-image-scaling/#description)
 * [Omtaler](https://nb.wordpress.org/plugins/proportional-image-scaling/#reviews)
 *  [Installering](https://nb.wordpress.org/plugins/proportional-image-scaling/#installation)
 * [Utvikling](https://nb.wordpress.org/plugins/proportional-image-scaling/#developers)

 [Brukerstøtte](https://wordpress.org/support/plugin/proportional-image-scaling/)

## Beskrivelse

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.

## Skjermbilder

[⌊The settings menu.⌉⌊The settings menu.⌉[

The settings menu.

## Installasjon

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.

## Ofte stilte spørsmål

  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.

## Vurderinger

Det er ingen omtaler av denne utvidelsen.

## Bidragsytere og utviklere

«Proportional Image Scaling» er programvare med åpen kildekode. Følgende personer
har bidratt til denne utvidelsen:

Bidragsytere

 *   [ sunside ](https://profiles.wordpress.org/sunside/)

[Oversett «Proportional Image Scaling» til ditt språk.](https://translate.wordpress.org/projects/wp-plugins/proportional-image-scaling)

### Interessert i utvikling?

[Bla gjennom koden](https://plugins.trac.wordpress.org/browser/proportional-image-scaling/),
sjekk ut [SVN-repositoriet](https://plugins.svn.wordpress.org/proportional-image-scaling/),
eller abonner på [utviklingsloggen](https://plugins.trac.wordpress.org/log/proportional-image-scaling/)
med [RSS](https://plugins.trac.wordpress.org/log/proportional-image-scaling/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

#### 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

## Meta

 *  Versjon **1.1**
 *  Sist oppdatert **10 år siden**
 *  Aktive installasjoner **20+**
 *  WordPress-versjon ** 2.0 eller nyere **
 *  Testet opp til **4.5.33**
 *  Språk
 * [English (US)](https://wordpress.org/plugins/proportional-image-scaling/)
 * Stikkord
 * [css](https://nb.wordpress.org/plugins/tags/css/)[images](https://nb.wordpress.org/plugins/tags/images/)
   [scaling](https://nb.wordpress.org/plugins/tags/scaling/)
 *  [Avansert visning](https://nb.wordpress.org/plugins/proportional-image-scaling/advanced/)

## Vurderinger

Ingen omtaler er sendt inn ennå.

[Din omtale](https://wordpress.org/support/plugin/proportional-image-scaling/reviews/#new-post)

[Se alle omtalene](https://wordpress.org/support/plugin/proportional-image-scaling/reviews/)

## Bidragsytere

 *   [ sunside ](https://profiles.wordpress.org/sunside/)

## Brukerstøtte

Har du noe å si? Trenger du hjelp?

 [Vis brukerstøtteforumet](https://wordpress.org/support/plugin/proportional-image-scaling/)