Hi, I tried your plugin first today, some code where added to htaccess and all images disappeared, when I click on an image link I get this line “Original image not found or not available.”
]]>More of a feature request…
One or more boxes on the admin interface for HTML elements of user defined IDs or classes.
Case: I have an SVG that is responsive but your plugin hijacks all “img” elements – which breaks the responsive logo SVG.
A temporary fix I have removed the plugin’s ability to target .svg – but leave everything else alone – by editing “specify-image-dimensions.php” line 78.
if ( preg_match( '/(.*).svg/i', $src ) ) {
$tag = sprintf( '<img src=%s%s%s%s%s%s%s%s%s%s%s%s%s%s>', $src, $srcset, $longdesc, $alt, $class, $id, $usemap, $align, $border, $hspace, $vspace, $crossorigin, $ismap, $sizes );
} else {
$tag = sprintf( '<img src=%s%s%s%s%s%s%s%s%s%s%s%s%s%s width="%s" height="%s">', $src, $srcset, $longdesc, $alt, $class, $id, $usemap, $align, $border, $hspace, $vspace, $crossorigin, $ismap, $sizes, $width, $height );
}
An admin interface allowing me to selectively “untarget” the element in question would be very useful.
Thank you.
]]>Like the title say, please check screenshot from icons when i install your plugin, i noticed the problem only with icons in search on the front page https://prnt.sc/lz3tyt
And see front page icons without plugin https://www.automotooglasi.com
Its a good plugin, score with plugin https://gtmetrix.com/reports/www.automotooglasi.com/rvHAkWpL
And without: https://gtmetrix.com/reports/www.automotooglasi.com/CcXfVmqo
Can you please help to solve this problem with icons?
Regards
]]>Hi,
I tried your plugin and the score went up on GTMetrix.com
But unfortunately the pages were loading very slow on the site.
I have wordfence, automizer and smush installed too.
]]>Hello,
I’ve installed this plugin few days ago, I decided to remove plugin,
but it doesn’t seems to disable effect, I’ve clear site cache many times.
Images still looks really weird.
Please help me to remove img width=”400″ height=”400″.
Thank you!
]]>i am seeing this is my error logs; is this plugin compatible with Jetpack?
PHP Warning: getimagesize(https://i.ytimg.com/vi/ID/hqdefault.jpg): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found\r\n in /nas/content/live/domain/wp-content/plugins/specify-image-dimensions/specify-image-dimensions.php on line 61, referer: https://domain.co.uk/tag/midwives/
]]>I found an bug that make some attributes disappear. So this code turns out like this:
<img id="rating_1952_1" src="https://www.foodcat.de/wp-content/plugins/wp-postratings/images/stars_flat(png)/rating_off.png" alt="1 Stern" title="1 Stern" onmouseover="current_rating(1952, 1, '1 Stern');" onmouseout="ratings_off(0, 0, 0);" onclick="rate_post();" onkeypress="rate_post();" style="cursor: pointer; border: 0px;">
<img src="https://www.foodcat.de/wp-content/plugins/wp-postratings/images/stars_flat(png)/rating_off.png" alt="1 Stern" id="rating_1952_1" width="17" height="16">
Here is the fix:
# Match all image attributes
$attributes = 'src|srcset|longdesc|alt|class|id|usemap|align|border|hspace|vspace|crossorigin|ismap|sizes|title|onmouseover|onmouseout|onclick|onkeypress|style|width|height';
…
# Recreate the image tag with dimensions set
$tag = sprintf( '<img src=%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s width="%s" height="%s">', $src, $srcset, $longdesc, $alt, $class, $id, $usemap, $align, $border, $hspace, $vspace, $crossorigin, $ismap, $sizes, $title, $onmouseover, $onmouseout, $onclick, $onkeypress, $style, $width, $height );
]]>
Have some issue with the plugin, some SVG images do not display. Once in carousel it works once in a normal block with a page builder it’s invisible. Will send you a link to a private email if you can share.
Otherwise a great plugin!
]]>When this plugin is enabled, the logo of my site does look with different proportions, bigger, and very bad. I have Extra theme (from Elegant Themes) enabled with my logo on top, and when enabling the plugin it changes and looks awful. If I disable the plugin then the logo looks good again.
]]>Removes classes from custom images and alt attr (might be svgs only) added via php. It doesn’t remove from imgs added through themes but the custom ones I echoed via php is filtered.
The targeted imgs is svgs only.
For example I wrote this:
echo "<span class='tflag'>" . "<a href='linkhere'>" . "<img class='fromtcat' alt='fromtcat' src="urlhere.svg" />" . "</a>" . "</span>";
The output was: <img src="urlhere.svg" height="auto" width="100%" />
the css was: width:67px; height:auto;
It should be: <img class="fromtcat" alt="fromtcat" src="urlhere.svg" height="auto" width="67px" />
Hi,
this plugin caused big problems with our webpage.
After looking into source, I have seen image tags are only allowed to print pre-defined set of attributes, but we had some data-foo attributes as our js depended on it.
After using this plugin all data-* attrs were stripped.
Maybe you should mention this in plugin description?
]]>Hello,
My WordPress website is running on Azure with IIS and MYSQL.
When I check gtmetrix for page speed, got the error related to image dimension like “The following image(s) are missing width and/or height attributes.”
It is showing this error for few images added by a plugin.
I have installed your plugin but getting same errors at gtmetrix.
Few Questions:
1. Your plugin is able to handle images added by plugin or not
2. Your plugin is able to handle images in page or work only for posts
3. Your plugin is tested with Azure IIS or not
4. Any other limit of your plugin, please mention, so that we can use it in our other website accordingly.
Thanks,
Sunil Chaudhary
Hello,
Thanks for the plugin.
However, it does not work on my website. I uninstalled all my plugins but it did not help.
I am using Listify theme.
The attributes: height and width are blank in the page source.
For example:
https://etatuator.pl/
<div class="home-feature">
<div class="home-feature-media">
<img src="https://etatuator.pl/wp-content/uploads/Budynki.jpg" alt="Studio w ka?dym mie?cie" width="" height="" />
</div>
<div class="home-feature-title"><h2>Studio w ka?dym mie?cie</h2></div>
<div class="home-feature-description"><p>Znajd? dost?pne studio w Twojej okolicy, opieraj si? na do?wiadczeniu i portfolio artystów.</p>
</div>
or:
https://etatuator.pl/studio-tatuazu/komorka/
<div class="listing-entry-company-image listing-entry-company-image--single listing-entry-company-image--type-logo listing-entry-company-image--style-circle">
<img src="https://etatuator.pl/wp-content/uploads/job-manager-uploads/company_avatar/WP_20160915_14_49_38_Pro-150x150.jpg" alt="komorka" class="listing-entry-company-image__img listing-entry-company-image__img--type-logo listing-entry-company-image__img--style-circle" width="" height="" />
</div>
Do you have any idea what is the cause of this issue?
Thanks.
Regards
Szymon
Hi dear
I am using PostSnippets for create a shortcode for show webP images.
But Specify Image Dimensions break my shortcode (I am not sure whats the problem)
I am using this code
<a target="_blank" href="{variable-url-link}">
<picture>
<source srcset="{variabe-url-webp}" type="image/webp">
<img src="{variable-url-image}" alt="{info_alt}">
</picture>
</a>
Thanks for support
]]>Hi dear
I am using the plugin but after last update now when I trying insert a image in a post or page the images in media gallery not showing
Thanks for support
]]>Hi i was so excited to see this plugin and am really hopeful you might be able to help me figure out why it’s not working for me. I couldn’t find any settings for the plugin so i assume you just activate it and it works? I activated it cleared my cache and still get the exact same rating on gt metrix for specifying image dimensions. Any help would be greatly appreciated.
]]>