{"id":1000526,"date":"2007-04-04T07:28:30","date_gmt":"2007-04-04T12:28:30","guid":{"rendered":"http:\/\/www.elharo.com\/blog\/software-development\/web-development\/2007\/04\/04\/supplying-img-sizes-automatically\/"},"modified":"2007-04-04T08:26:58","modified_gmt":"2007-04-04T13:26:58","slug":"supplying-img-sizes-automatically","status":"publish","type":"post","link":"https:\/\/www.elharo.com\/blog\/software-development\/web-development\/2007\/04\/04\/supplying-img-sizes-automatically\/","title":{"rendered":"Supplying img sizes automatically"},"content":{"rendered":"<p>What if any tools are available for reading HTML, finding missing <code>width<\/code> and <code>height<\/code> attributes on <code>img<\/code> elements, and filling in the relevant values? So far all I&#8217;ve found is this <a href=\"http:\/\/www.stonehenge.com\/merlyn\/WebTechniques\/col36.html\">Perl Script<\/a> from Randal Schwartz circa 1999 and <a href=\"http:\/\/marc.merlins.org\/linux\/scripts\/addsize\">this Perl script<\/a> based on ImageMagik from Marc Merlins. I haven&#8217;t been able to resolve the dependencies for Schwartz&#8217;s script yet. Merlins&#8217; runs, but is not XHTML savvy. That may be easy to fix though.<\/p>\n<p>BBEdit almost does this, but it replaces existing height and width attributes too, including ones you&#8217;ve deliberately set to a different size. I only want to fill in missing height and width attributes, not change existing ones.<\/p>\n<p>I&#8217;d love to find a simple open source GUI tool that could pull this off for an entire site. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>What if any tools are available for reading HTML, finding missing width and height attributes on img elements, and filling in the relevant values? So far all I&#8217;ve found is this Perl Script from Randal Schwartz circa 1999 and this Perl script based on ImageMagik from Marc Merlins. I haven&#8217;t been able to resolve the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[410],"class_list":["post-1000526","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-flash"],"_links":{"self":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/comments?post=1000526"}],"version-history":[{"count":0,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000526\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/media?parent=1000526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/categories?post=1000526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/tags?post=1000526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}