support for img attrs values with 'px' ending

If width and height img attributes set with 'px' ending then ratio is NaN and plugin fails. I added check if both width & height are valid values with 'px' ending. Then, in this case, plugin parses floats from these values to find the ratio later.