local images are not displayed, in octopress - image

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.

Related

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

How to upload extra images to magento listing using Magmi media_gellery?

I am trying to upload listing to magento using Magmi. All works fine except adding extra images with media_gallery. I am using images from remote server and separating hrefs with semicolons as in example in docs. but still having problems.
Peace from csv:
..,media_gallery,...
..,http://i.ebayimg.com/00/s/MTYwMFgxNjAw/z/n4YAAOSw5dNWoA55/$_57.JPG,http://i.ebayimg.com/00/s/MTQ3M1g5ODI/z/lFwAAOSwkZhWTOOF/$_57.JPG;http://i.ebayimg.com/00/s/MTQ3M1g5ODI/z/vX4AAOSwZVhWTOOC/$_57.JPG,..
Am I doing something wrong with this column?
Found the problem, it was image name, because it is same it gets overwritten. You have to make sure that images in media_gallery has different names. In this case renaming functionality in configuration would not help, as it will rename all images to same name again.

Read image files from non-default directory in PrestaShop 1.6

Hello Stack Overflow community, I have installed PrestaShop 1.6.0.14 in a Xampp server a few weeks ago for the company I work for. They have a web application that handles all the image files from their websites, for example, when a user opens an image with right click->open image in different tab or similar, the url shown is something like:
http://www.example.net/FileViewer/File.aspx?Type=3&File=WebsiteFileDirectory/img/logo.jpg&Width=138&Height=50
As you can see, after the &File= part comes a directory structure and some parameters to handle the image at the end. This directory (WebsiteFileDirectory) is located in C:/StorageFiles/Volume1/, where the web app for image handling looks for file sources.
My PrestaShop /img/ folder needs to be in that location with a directory structure similar to C:/StorageFolder/Volume1/PrestashopFileDirectory/img. So far, I've moved /img/ to that location and managed to make Prestashop write into the new location by editing the constant values _PS_IMG_, _PS_IMG_DIR_ and _PS_CORE_IMG_DIR_ in config/defines.inc.php and config/defines_uri.inc.php
But after that I've hit a brick wall when trying to make PrestaShop read from that location, I've even tried editing the LinkCore::getImageLink() method by hardcoding a uri_path value pointing to the directory mentioned before, with no results whatsoever, PS will try to read from the default location (something like myshop/16-small_default/image_filename.jpg)
How can I make PrestaShop read from that location? Is there even a way to do that?
Thanks in advance.
P.S.: Just to make sure I get a straight forward answer I want to let you know that by now I figured how the image file system in PS 1.6 works, if the image id is 25, PS will store the file in img/p/2/5/ for a product image, I have no problem with anything related to that.
Well, it turns out that getImageLink must be fed a URL (from the image handling webapp I mentioned before), not a filesystem path. So, the uri_path variable in this method would look like:
$uri_path = 'http://www.example.net/FileViewer/File.aspx?Type=3&File='.$my_img_directory.'&Width=138&Height=50';
The methods I have figured so far that need similar tweaking are getMediaLink and getCatImageLink, from the same Link class in the classes/Link.php file.

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.

Localhost is no longer working properly

I just built a site using Xampp and it worked great. I just transferred my site (that I used to develop by updating to live server) to localhost, and it isn't working right at all.
The images do not show and the pages are not refreshing properly.
I had to change the CSS images to /folder/x instead of just x, which I can understand I guess, but why are my HTML images suddenly not working?
One of the pages, the paths are even absolute, but the page just isn't updating even though it's saved in the local folder.
What gives? All I did differently was added a password to root user in MySQL and tried (and failed) at some mod_rewrites, which I removed.
It points the images from localhost/ instead of localhost/folder, even adding folder/x doesn't work.
You probably forgot to convert a link or made a mistake.
Remember that /images/x.png means that it's trying to find the folder images from root and not from the current folder your site is located in. Try using ./images/x.png instead.
Perhaps you could post an example from your site?
Try looking at the Apache access logs and see whether you can find a request for an image with the wrong path.

Resources