WP Fluid Images

WP Fluid Images

توسط

WP Fluid Images runs when you insert an image into a Post or Page. It removes the fixed width and height attributes from the image tag. If you insert an image from the image uploader, by default, a width and height attribute is inserted into the image tag with fixed pixel values. This plugin prevents this from happening, because this can be problematic if your theme is built using responsive design methods. The plugin also adds a style tag near the end of the document that sets a max-width rule of 100%. This helps ensure that any image in a Post or Page won’t extend past the width of the Post or Page.

If you resize an image in the Visual Editor, a new width and height attribute get added to the image. WP Fluid Images loads a jQuery script that examines the closest parent div for image tags. It calculate the image’s width as a percentage of the width of that div, removes the width and height attributes, and adds a style attribute with a width value set to the calculated percentage.

An image that is part of a WordPress gallery will have it’s width attribute calculated as a percentage of its parent .gallery-icon element.

If you insert an image with a caption, instead of applying a style attribute with a width as a percentage to the image, the plugin will apply it to the .wp-caption div.

  1. Upload the folder fluid-images to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

سوالات متداول

What is Fluid Images?

Fluid Images is the concept of having images that size proportionally and smoothly as your web page’s width increases or decreases. Ethan Marcotte wrote an article on the idea at A List Apart: http://www.alistapart.com/articles/fluid-images/
You can also learn more at his site: http://unstoppablerobotninja.com/entry/fluid-images/

What is Responsive Web Design?

Responsive Web Design is the idea of having your site’s design adjust based on the width of the browser window. This allows you to create a single, adjustable design that works regardless of the size of the device, rather than building a design for desktop browsing, another for tablets, another for mobile phones, etc.

How can I override the image widths in my theme?

You can override the style rules by adding a more specific style in your theme’s style sheet (style.css). The style added to wp_footer contains this declaration:
img { max-width:100%; height:auto; }

In your style sheet, add a declaration that has a parent element’s tag, class, ID, or some combination, along with the img tag and your desired width and height.
Examples:
body img { max-width: 90%; }
#content img { max-width: 99%; }

The greater specificity will override the plugin's default img` max-width value.

تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
هیچ نسخه‌ای برای این آیتم موجود نیست.
★★★★★
★★★★★
5.0 /5 (7 نظر)

قیمت:

رایگان

نگارش

آخرین انتشار

20 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

400+

نگارش وردپرس

وردپرس 3.0+

تست شده از نسخه

وردپرس 3.4.2

نگارش PHP

-

تگ ها

نسخه ها

0 نسخه