Loading external jpgs and resize

Hello, I want to know how can I load external jpgs into a “frame” and depending on the size of the jpg resize this “frame” as you can see here:

http://www.terra.es/personal8/933170888

Thanks in advance.