feat: favoring preview_url over remote_url for image previews
This commit is contained in:
parent
f0de1ddd9b
commit
4ba567daa3
@ -3,7 +3,7 @@
|
|||||||
Plugin Name: Include Mastodon Feed
|
Plugin Name: Include Mastodon Feed
|
||||||
Plugin URI: https://wolfgang.lol/code/include-mastodon-feed-wordpress-plugin
|
Plugin URI: https://wolfgang.lol/code/include-mastodon-feed-wordpress-plugin
|
||||||
Description: Plugin providing [include-mastodon-feed] shortcode
|
Description: Plugin providing [include-mastodon-feed] shortcode
|
||||||
Version: 1.10
|
Version: 1.11
|
||||||
Author: wolfgang.lol
|
Author: wolfgang.lol
|
||||||
Author URI: https://wolfgang.lol
|
Author URI: https://wolfgang.lol
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -370,10 +370,7 @@ function init_scripts() {
|
|||||||
if('image' == media.type) {
|
if('image' == media.type) {
|
||||||
let mediaElemImgLink = mastodonFeedCreateElement('a');
|
let mediaElemImgLink = mastodonFeedCreateElement('a');
|
||||||
let imageUrl = media.url;
|
let imageUrl = media.url;
|
||||||
if(null !== media.remote_url) {
|
if('full' !== options.images.size && null !== media.preview_url) {
|
||||||
imageUrl = media.remote_url;
|
|
||||||
}
|
|
||||||
else if('full' !== options.images.size && null !== media.preview_url) {
|
|
||||||
imageUrl = media.preview_url;
|
imageUrl = media.preview_url;
|
||||||
}
|
}
|
||||||
mediaElemImgLink.href = status.url;
|
mediaElemImgLink.href = status.url;
|
||||||
|
@ -5,7 +5,7 @@ Tags: mastodon, status, feed
|
|||||||
Requires at least: 6.0
|
Requires at least: 6.0
|
||||||
Tested up to: 6.8
|
Tested up to: 6.8
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
Stable tag: 1.10
|
Stable tag: 1.11
|
||||||
License: MIT
|
License: MIT
|
||||||
License URI: https://directory.fsf.org/wiki/License:Expat
|
License URI: https://directory.fsf.org/wiki/License:Expat
|
||||||
|
|
||||||
@ -154,6 +154,9 @@ Use the following URL to get your ID:
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.11 =
|
||||||
|
* now favoring preview_url (smaler size) instead of remote_url (full size) for image previews (thank you @oldrup@mastodon.green)
|
||||||
|
|
||||||
= 1.10 =
|
= 1.10 =
|
||||||
* added image lazy loading for account and post images - post image lazy loading only works with preserveImageAspectRatio set to true (thank you @oldrup@mastodon.green)
|
* added image lazy loading for account and post images - post image lazy loading only works with preserveImageAspectRatio set to true (thank you @oldrup@mastodon.green)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user