/ Published in: Ruby
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 height_width = "" image_info_cmd = ENV['TM_BUNDLE_SUPPORT'] + "/bin/ImageInfo" image_winfile = %x{cygpath -w "#{full_path}"}.chomp width, height = %x{"#{image_info_cmd}" "#{image_winfile}" }.split[2, 3] if height && width height_width = %Q{ height="#{height}" width="#{width}"} end print %Q{<img src="#{url}" alt="${1:#{CGI::escapeHTML alt}}"#{height_width}#{ENV['TM_XHTML']}>}
Comments
                    Subscribe to comments
                
                