You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+101-3Lines changed: 101 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,11 @@
1
+
##WordPress 4.4 and Native Responsive Images
2
+
3
+
As of WordPress 4.4, images are responsive by default. If you are on WordPress 4.4 or plan to update, you will not need to install this plugin.
4
+
5
+
If you have had this plugin installed since before version 2.5 but are running version 4.4 of WordPress, it is important that you leave the plugin installed. This is because all versions of the plugin before version 2.5 relied on a `data-sizes` attribute being present on an image in order to provide the responsive markup needed. If the plugin in this case is removed, then images in posts will be left with invalid markup. We are working to address this issue, and you can [keep track of our progress here](https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/issues/178).
6
+
7
+
You can still use the plugin for advanced image compression support or as a simple way to include the picturefill script. The plugin will fall back to WordPress default functions if responsive image support is detected in your installation.
8
+
1
9
RICG-responsive-images
2
10
---
3
11
@@ -9,7 +17,7 @@ This plugin works by including all available image sizes for each image upload.
9
17
10
18
## Contribution Guidelines
11
19
12
-
Please submit pull requests to our dev branch. If your contribution requires such, please aim to include appropriate tests with your pr as well.
20
+
Please submit pull requests to our dev branch. If your contribution requires such, please aim to include appropriate tests with your PR as well.
13
21
14
22
## Documentation
15
23
@@ -19,7 +27,7 @@ No configuration is needed! Just install the plugin and enjoy automatic responsi
19
27
20
28
### For Theme Developers
21
29
22
-
This plugin includes several functions that can be used by theme and plugin developers in templates.
30
+
This plugin includes several functions that can be used by theme and plugin developers in templates, as well as hooks to filter their output.
23
31
24
32
### Advanced Image Compression
25
33
@@ -153,6 +161,26 @@ Array of width and height values in pixels (in that order).
153
161
154
162
`wp_calculate_image_srcset()`
155
163
164
+
##### Usage Example
165
+
166
+
```
167
+
<?php
168
+
// Increase the limit to 2048px if the image is wider than 800px.
169
+
170
+
function custom_max_srcset_image_width( $max_width, $size_array ) {
@@ -18,6 +18,13 @@ This plugin works by including all available image sizes for each image upload.
18
18
19
19
**Important notes**
20
20
21
+
* As of WordPress 4.4, images are responsive by default. If you are on WordPress 4.4 or plan to update, you will not need to install this plugin.
22
+
23
+
If you have had this plugin installed since before version 2.5 but are running version 4.4 of WordPress, it is important that you leave the plugin installed. This is because all versions of the plugin before version 2.5 relied on a `data-sizes` attribute being present on an image in order to provide the responsive markup needed. If the plugin in this case is removed, then images in posts will be left with invalid markup. We are working to address this issue, and you can keep track of our progress here at https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images/issues/178.
24
+
25
+
You can still use the plugin for advanced image compression support or as a simple way to include the picturefill script. The plugin will fall back to WordPress default functions if responsive image support is detected in your installation.
26
+
27
+
21
28
* Version 3.1.0 includes important changes that make this plugin compatible with WordPress version 4.4. Upgrading is highly recommended.
22
29
23
30
* As of version 2.5.0, the plugin adds `srcset` and `sizes` attributes to images on the front end instead of adding them to the image markup saved in posts.
@@ -32,6 +39,15 @@ This plugin works by including all available image sizes for each image upload.
32
39
33
40
== Changelog ==
34
41
42
+
= 3.1.1 =
43
+
* Fixes a bug where the srcset of images in imported content was missing or broken.
44
+
* Improved calculation of ratio difference for images to be included in the srcset.
45
+
* Fixes a bug where `img` tags without ending slash don't get responsive images.
46
+
* Deprecates the helper function `tevkori_get_media_embedded_in_content()` which is no longer used.
47
+
* Makes sure that the setup of default themes doesn't break the tests.
48
+
* Adds more examples to the Hook Reference in readme.md.
49
+
* Corrections and improvements to inline documentation.
50
+
35
51
= 3.1.0 =
36
52
* Adds special handling of GIFs in srcset attributes to preserve animation.
37
53
* Makes internal srcset/sizes functions more consistent.
0 commit comments