/    Sign up×
Community /Pin to ProfileBookmark

Temporary image sizes

Would it be possible to resize an image to fit a page temporarily? So if an image is uploaded, and its dimensions are large, I can just do

<img src=”image.jpg” width=”PHPcreateddimension” height=”PHPcreateddimension”>

Is this possible? I do not want to have to create a new image I just want it to size the image.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ZiplineApr 09.2006 — You could create a new temp image that isnt stored it is just created on the fly. Or you could compress the larger image like you're suggesting there. I would go with the first option becuase if it is a large digital photo it will take a long time to download if compressed.

If you want to resize on the fly here is a function that will do it for you, however, it would have to be modified because this function is intended for saving the resized images.

http://www.hotscripts.com/Detailed/41276.html
×

Success!

Help @Viajero spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...