Description: When opening a html file with Writer Web the size of constant ratio pictures are not properly loaded. If a picture has a given "width" and "auto" "height" Writer Web is replacing the "auto" height with the actual height of the picture. Exemple: file with html code: <img src="../image.png" name="Image" align="bottom" width="75%" height="auto" border="0"/> becomes <img src="../image.png" name="Image" align="bottom" width="75%" height="305" border="0"/> when saved again by Writer. Issue seems to be at html file reading step as the pictures ratio changes when resizing Writer Web window after file opening. Steps to Reproduce: 1.Create HTML file with picture. Set picture proportional width size, set "keep original ratio" 2.Store html file and close Writer Web. In the saved html file height="auto". 3.Load the html file in Writer Web, picture ratio isn't kept. Actual Results: When loading an html file containing a picture with constant ratio (width=xxx, height=auto) the "keep ratio" property shall be set for the picture. Expected Results: When loading an html file containing a picture with constant ratio (width=xxx, height=auto) the "keep ratio" property isn't set for the picture. "Keep ratio" Property is lost. Reproducible: Always User Profile Reset: Yes Additional Info: Load picture with "auto" height attribute as a "constant W/H ratio".
Creation of an HTML document with Writer Web is working well and HTML file saved is correct as well. However when the document loaded again the sizes of the images aren't properly restored: images created with a given proportional width (width="60%" for instance) and height="auto" are loaded with the correct proportional width (width="60%") but a fixed pixel width: width="305" for instance! This makes writer web unusable to edit an html document.
Please attach an example file, so we can quickly test. The picture could be base64 encoded in the html, so there is no need to attach a zipped collection of files. The picture could be some single-colour rectangle for simplicity and small size.
Created attachment 195457 [details] Files for testing: html file and png image file Please find attached a zip file with two files: - test_file.html - image.png Unzip in a single directory. Then you can examine the html_test.htmlexample in a browser, examine the html file in a text editor and notice the image format: <img src="image.png" name="Image1" width="30%" height="auto" border="0"/> Then open the file with LibreOffice Web, examine the image properties and notice that "Keep ratio" checkbox is UNCHECKED. Thanks Francis
[Automated Action] NeedInfo-To-Unconfirmed
Confirmed with attached files. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 85e4dc15d09dc3193870041b2814263971a27791 CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded