Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

img width height validation

Posts: 44
Joined: 17 Jun 11

img width height validation

Is there a way to validate pages without 1 image having width height validation? I have a dynamic image which can change in width/height so cannot declare the dimensions in the img tag..
  • 0
Site Admin
Posts: 7034
Joined: 25 Feb 11
This is really a question best answered by a programmer or developer. I checked with a member of our technical staff and he said this depends on the type of script that you're using. The following websites might help:

Getting width and height of dynamic image
Dynamic Image Generation

Have a good day!
  • 0

Step by step guide to "Penguin-proofed" sites :

Add us on Google Plus:
Posts: 109
Joined: 13 Sep 11
I think it could be done if you replace the img tag with a call to a server-side script that will write the img tag, together with the name of the image and its dimensions. The page will be parsed by the server and sent to the validator or to the visitor's browser as plain HTML. You should have a valid page, and the scripted tag should always validate.
  • 0

This topic was started on Aug 08, 2011 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.