scott_hancock-urmc.rochester
-
8/3/2012 9:53:03 AM
RE:Media Library Image URL's Change to Permanent URL's When Changing Width
Hi,
I didn't realize what was happening in the background.
When you are inserting an image from a media library:
If you set the width or height larger, it just inserts it normally, resizing it with css.
<img alt="" src="/MediaLibraries/MyLibrary/test.jpg" style="width: 250px; height: 164px;" />
If you set the width or height smaller, it creates a new file in a __thumbnails folder (in the same directory as the original image) and changes the url to use getmedia.
<img alt="" src="/getmedia/5ee23f02-2702-4f75-9291-05d6629fd304/test.aspx?width=25&height=16" style="width: 25px; height: 16px;" />
If you delete the image in the editor, the thumbnail will not be deleted. So you could end up with a lot of files in the __thumnails folder that aren't used.
If you delete the __thumbnails folder, the images won't break, the folder and image will be recreated the next time it's requested by the browser. That would be one way to get rid of unused thumbnail images.
Why does the system do this? I understand that resizing the image in CSS will cause pixelation but I could just resize the image myself. Why does it only do it when you make it smaller? Is there any way to turn this off?
I searched through the documentation and I can't find any reference to this functionality. You should add it to prevent confusion.
Thanks, Scott
|