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.
Related
I deleted the pictures through the Joomla panel and I get such an error on the page as you can see in the picture. How to deal with this?
How to add redirection but without domain?
Your first issue about the pictures seems to be an issue with the component you're using, which is com_joomgallery in your case. When you delete the picture, it gets deleted but somehow its showing up in your JoomGallery image listing and so is the error.
Can you let me know from where you've deleted the photos? Was it from JoomGallery or from somewhere else?
If you haven't deleted them from JoomGallery then that's the reason for your issue, because JoomGallery database table still have those records and when it tries to list them its unable to find the thumbnails/images that you've deleted.
About your second question, how are you redirecting to external URL? If you're trying to open the external URL from an anchor tag try doing it like
Link
But you're using Route::_ to open the external URL, then don't. As Route::_ isn't used for external links but is meant only for internal URLs. If you want to open or redirect using Joomla, then try like this
$url = Uri::getInstance("//www.facebook.com");
$url->setScheme("https");
$externalURL = $url->toString();
echo "<a href='$externalURL'>Link</a><br>";
I hope this helps.
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.
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.
I am currently using carrierwave-aws to upload to my S3 bucket.
One issue I am having is after the image is uploaded and saved, if the user, lets say changed something about the image locally and re-submitted for upload with the same file name, it will not reflect the new file uploaded.
The user has to change some part of the file name for it to show the correct one in my application.
I am assuming this is a caching issue but not sure where to begin to address this matter.
Has anyone else experienced this?
If your S3 bucket is set with a long or infinite expiry (which is a good idea for performance), you'll need to change the filename each time the image changes. See the Carrierwave wiki page on how to do this.
Error : Image type and information need to be specified for each store view.
I have tried cache clearing and it doesn't help for me.
I am using magento 1.8
just do below step as per link
http://mokamedia.ca/how-to-fix-image-type-and-information-needs-to-be-specified-for-each-store-view-in-magento-commerce/
Also try this
http://magentopaper.blogspot.in/2011/10/image-type-and-information-need-to-be.html
Try adding a php.ini file in your magento root directory and see whether it works:-
magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so
hope this will help you
I resolved this issue in 1.9.x using "Dull uploader" which removed the smart flash uploader in favor of a plain browser based file upload.
Image type and information need to be specified for each store view:
Go to File structure root/media/ dhl
Cut or delete the “dhl” folder from there.
Clear cache from Admin Panel and now do upload the images
Hope, Its working good.