Open danbrady opened 11 years ago
Make sure your image is accessible, e.g. it exists and it’s path can be resolved against active file (make sure it’s also saved and exists in your hard drive).
Thanks for answer, Sergey. I've created a test project and put both the file (html) and image (png) in same location within the project and I'm still not seeing any results when running these commands. The files are saved and display correctly within the preview, a browser running locally, and on a web server. However, I'm not sure I understand if the path is being resolved to the active file within Aptana?
I'm not sure what else I could be doing wrong... unless it's some other system setting.
How does path to image looks like? It’s absolute (<img src="/image.png">
) or relative (<img src="image.png">
)?
The image path is relative. Both file and image are in the same directory. Thanks.
An update on this issue:, if the file path is fully absolute, e.g. (<img src="http://127.0.0.1:8020/img/image.png">
) then the Update Image Size and Encode data:URL features will work. But if it's relative to the file, they do not.
If it works for absolute paths, then it can’t locate your image with relative path. Can you give me absolute paths of your HTML and image files?
Ah, I think I've discovered the issue. It appears that if there are spaces in the file path to the project, Emmet cannot find the image, even if it's relative to the HTML.
My test: I created two new projects, one at 'C:\test\' and one at 'C:\test foo\'. In both projects the html and image files are both in these root folders and the image is coded relatively (e.g <img src="image.png"/>
). In the 'C:\test' project, the image dimensions and dataURL are resolved correctly, but in the 'C:\test foo' project they do not.
Aptana, by default, sets up the folder for new projects to live here: C:\Users[userId]\Documents\Aptana Studio 3 Workspace\, which is what I was using when I discovered the issue. I bet the spaces in the last folder are causing these issues.
Oh, thanks for research, I’ll try to fix it.
I've tested the same process as the example page in both html and css files without any results. I don't see any errors but the tags do not get updated. All other Emmet functionality appears to work okay.
Just a clarification: I've tried bot the file menu options and keyboard shortcuts (after making sure there were no conflicts there) to attempt this.
Aptana Studio 3, build: 3.3.2.201302081546