emmet-eclipse icon indicating copy to clipboard operation
emmet-eclipse copied to clipboard

Update Image Size and Encode/Decode DataURL not working in Aptana 3

Open danbrady opened this issue 13 years ago • 8 comments

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


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

danbrady avatar Apr 05 '13 16:04 danbrady

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).

sergeche avatar Apr 10 '13 14:04 sergeche

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.

danbrady avatar Apr 11 '13 18:04 danbrady

How does path to image looks like? It’s absolute (<img src="/image.png">) or relative (<img src="image.png">)?

sergeche avatar Apr 18 '13 08:04 sergeche

The image path is relative. Both file and image are in the same directory. Thanks.

danbrady avatar Apr 18 '13 21:04 danbrady

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.

danbrady avatar May 09 '13 15:05 danbrady

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?

sergeche avatar May 10 '13 09:05 sergeche

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.

danbrady avatar May 10 '13 15:05 danbrady

Oh, thanks for research, I’ll try to fix it.

sergeche avatar May 10 '13 15:05 sergeche