Changeset 23048
- Timestamp:
- 12/04/2012 11:07:41 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r23041 r23048 762 762 image = new Image(); 763 763 764 // Try to load the image and find its width/height. 764 765 image.onload = function() { 765 766 if ( state !== frame.state() || url !== state.props.get('url') ) … … 774 775 775 776 image.src = url; 777 778 // Check if the URL looks like an image; skew toward success. 779 url = url.replace( /([?|#].*)$/, '' ); 780 if ( /\.(png|jpe?g|gif)$/i.test( url ) ) 781 attributes.type = 'image'; 776 782 }, 777 783
Note: See TracChangeset
for help on using the changeset viewer.