Using AutoFileName with Sublime Text 2 - editor

I have installed the package 'AutoFileName' but when I try to define an img source I recieve only tag options and not images. Does anyone know if I have to define the folder where my images are or where AutoFileName looks for images?

AutoFileName lists files based on the html file you edit. For example, if test1.img, test2.img and test.html are in the same folder, it will list test1.img and test2.img if you are trying to add <img src=""> in test.html.

Related

Get Content Folder Images In Areas Admin View ASP.NET MVC

I want To get Images in Project/Areas/Admin/Index ..
and images in Project/Content Folder
so it show error when i use
<img src="#item.ProductImagePath" />
error
GET https://localhost:44378/Admin/Home/Content/dress3.jpg ERROR..
it find image on Admin but images are in content folder
It Added Admin in Image Path
here the image of directory and img tag
I think you use wrong routes.
for example, this image in admin areas and you can see it:
https://take-car.ru/areas/admin/MxPBksiUmnA.jpg

How to add an image to be used in the customized css file - Swagger UI - Swashbuckle

I'm using Swagger(Swashbuckle) as the documentation tool for our Web API project. I'm able to customize index.html using customized css file.
Everything's works great, except, I want to add our company's specific logo in the index page & I couldn't get it to work.
Suggestions ??
I realize this is an older question, but I just ran into this today. If you want to embed an image file, you can do it similar to how you do for the css and index file.
Add a line in the SwaggerConfig like the following:
c.CustomAsset("mylogo", thisAssembly, "YourWebApiProject.SwaggerExtensions.mylogo.png");
You can then reference that file either in your modified css or custom index page by using <img src="mylogo" /> in your modified html or url(../mylogo) for the path if using it in your custom css file.
Similar to your index and css files, make sure it's set as an embedded resource.
What about including this in your CSS:
.swagger-section #header a#logo {
background-image: url(path/to/my/logo);
}

Rails images in many folders

I bought ready css and html template. There is many images in many folders, for example:
/images/folder_a/folder_a2/folder_a3/image.png
/images/folder_a/folder_s2/folder_s3/image.png
/images/folder_a/folder_b2/folder_b3/image.png
/images/folder_a/folder_z2/folder_z3/image.png
Is there some way in rails to do not write path to every image in view?
<%= image_tag('image.png') %>
gives not_found if I do not write path to it. I know I can copy all files to /images/ ...
You could write helpers for each of the major folders to cut down on having to repeat them. If they follow themes this would make sense (ie. icons, header images, borders, buttons etc.)
try these answer image_tag 'image.png' or image_url 'image.png'

How to add image in pdf file

I have used this blog for adding a dynamic pdf in my project. when i am tryng to add a image than it is compelling me to have a Image folder in C:\ . How can i add a image from project.
This appears to be using a html view page to render the PDF so you can just use a normal img tag like you would in any html page.
With razor syntax you can do something like this:
<img alt="" src="#Url.Content("~/Content/Images/mypic.png")" />
I believe this may solve your issue. Essentially you want to specify the full web url as the src of the img, for example:
<img alt="" src="www.example.com/images/mypic.png" />

PDFkit doesn't display pictures in PDF

Rails 2, PDFkit 0.5.0
Im generating a PDF from a View in Rails 2 with PDFkit and everything works fine. The only thing which doesn't work is displaying pictures in the pdf.
When I look at the View in the Browser, the picture is there but its missing in the PDF. There is only a placeholder existing in the PDF.
The image_tag is looking like this:
<%= image_tag('plus.gif') %>
I also tried to realize it with a css-file but it doesn't work either.
Any ideas?
Because of the way that wkhtmltopdf works you need to specify the full path to any assets (JS, CSS, images etc), including the domain name.
This won't work:
<img src="/images/foo.png" />
This will:
<img src="http://example.com/images/foo.png" />
One workaround is to set an explicit asset host, even if it's the same server as your app is running on (see the AssetTagHelper documentation for details). Another would be to specify the hostname in the image_tag.
Instead of putting the full path each time, you can add a base tag to the head section.
<base href="http://mydomain.com" target="_blank" />

Resources