how to use a local image as a Qicon - image

I want to use githubLogo.svg as a Qicon so I did this:enter image description here
But it's not working.
enter image description here
I don't understand why is not working, I used the quasar doc (https://quasar.dev/vue-components/icon#introduction) and I don't what I did wrong.

In quasar, for some reason(which i don't know) in order to bind assets dynamically to quasar components, you have to keep your images inside of "/public" directory.
Create a new folder called "images" in your project's "/public" and it should work just fine.
best of luck to you.

Related

How to show images in thymeleaf that are not in static folder in src

I'm uploading images to a folder productImages which is not in the src folder of spring boot project. I'm storing the paths of each image. How can i use th:src=#{product.image} to display the image where product.image is the path from database(e.g productImages/photo.jpg). My problem is getting the location to the folder.
As I understand it, you wish to specify server-relative links in Thymeleaf. (as opposed to context-relative). Basically, when you want to specify a resource outside of the application context, but relative to the server, you use the tilde notation. So, instead of:
th:src="#{/product.image}"
you should use:
th:src="#{~/product.image}"
You will find very nice clear & concrete examples with explanation at:
https://www.thymeleaf.org/doc/articles/standardurlsyntax.html.
Hope this helps! :)

Where can I place the icon to get picked up by spring-boot-admin?

I am trying to replace default favicon and main page svg.
I placed them in resources:
assets/img/my-logo.svg
favicon.ico
and in application.yml
spring.boot.admin.ui.brand: "<img src='assets/img/my-logo.svg'><span>MyBoot Monitor</span>"
Still its showing 404 error.
Update: I realize that favicon cant be replaced like that.. But, spring.boot.admin.ui.brand SHOULD WORK as mentioned in Reference.. Please help..
I have raised an issue here:
https://github.com/codecentric/spring-boot-admin/issues/903
Lets wait for the response :)
To replace the images, you need to place your images in the resources folder of your project. The folder structure needs to be "META-INF/spring-boot-admin-server-ui/assets/img", otherwise it will not work.
Here I have added a PNG file, but you can use any type of image file.
Then you need to add the properties in the application.yml.
You can file more details about the properties at http://codecentric.github.io/spring-boot-admin/2.0.2/#spring-boot-admin-server

Magento Image Url "_1.png" added to Image URL

On my website Magento adds _1 to the end of some Image urls.
So my normal basic urls should be ...media/catalog/product/cache/9/A/E/test-small.png
but somehow for some images it alters to ...media/catalog/product/cache/9/A/E/test3-small_1.png
My normal image names are unique numbers so I´m confused why this happens?
Could anyone help?
Magento will add a _1 after any image if the file already exists on the server.
Please mind that Magento is not doing cleaning of the images of products when / if you delete one product.
It is magento's by default feature, if the image name you are trying to upload already exist it will rename your current image name with _Number. Check before uploading.
Thanks
If anyone comes across this post using M2 and is having the same issue. Check out the media/tmp folder. I was working on an api image sync and the name kept having a _1, _2 etc after the image.
It turns out Magento doesn't always give a clear reason if something fails in the api so the file was making it to the tmp directory but never the final destination causing the file name issue.

local images are not displayed, in octopress

I create a post and hope to display some local images, so I put some images in the folder of source/images/my_dir/image.jpg
And then I use the following two ways to display the pictures.
![method 1](../images/my_dir/image.jpg)
![method 2](http://my_username.github.io/my_dir/image.jpg)
And then I generate the post and deploy to github page.
I can see that the images is copied in the folder of _deploy/images/my_dir/
But method 1 is not working, instead, method 2 is working. Why is that?
PS:I am using windows7 to write the post in markdown pad.
In your atom.xml all img src must be of the form ![method 2](http://my_username.github.io/my_dir/image.jpg). Feeds reader must have resources full urls to display them correctly.
In your post it's ![method 1](/images/my_dir/image.jpg)
Apparently, jekyll is enabled by default and will skip directories that begin with "_". To disable the behaviour, drop an empty file named ".nojekyll" in the root dir.
More info here
Yes, it drove me mad too.

how to build image service website with sails.js

I am using sails.js to build an image service website. There are lots of images need be shown on the webpage. And the website will allow users to upload images as well. If I put it all images under assets folder, they will be copied to .tmp/public everytime when i restart the sails server . it will be very slow. Does anyone have an idea where should i put .Should I write a route rule to handle this? thanks.
/assets are for your static contents (like css, frontendjs, ...).
If you have a lots of images you should place them in one folder of your server and write a route for showing it.
Or better: Use some Cloud-Hosting like amazonS3 or imageShack.
Example for middleware:
1.) create a file "express.js" in config/
2.) Put this code into the file and change to the right path (routing + your local folder):
module.exports.express = {
customMiddleware: function(app){
app.use('/images', require('../node_modules/sails/node_modules/express').static('/User/yourfolder'));
}
}

Resources