Magento images not showing on front end - image

I'm using Magento 1.4. I have two website set up. If I upload images to Website A, they appear fine on both front and back end. If I upload or import images to Website B, they do not appear on the front end, only the backend. I'm completely stuck. I'm happy to provide any additional details that may be helpful, but am so frustrated I'm not sure what is necessary info to fix the problem. Thanks!

I had the same problem., After someone suggested delting the .htaccess file in /media (which is of course a bad idea) ich chekced all the parameters and found that both
Options All -Indexes
and
Options +FollowSymLinks
got me an error 500.
commenting them out fixed the problem. I also replaced
Options +FollowSymLinks
with
Options +SymLinksIfOwnerMatch
Options -MultiViews

Just Rename your .htaccess file inside the /media directory to .htaccess-old. This will absolutely resolve your image issue. - See more at: http://www.viraljetani.com/programming/magento-images-not-appearing-on-frontend-as-well-as-backend-on-godaddy-server#sthash.Uxd9kXqI.dpuf

Make sure your /media folder is writeable.

Try
deleting the cache
rebuilding indexes
Then:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 775 {} \;
SSH from the root of magento, if you working live

If you use big images, try to increase 'memory_limit' parameter in your 'php.ini' file.

Try editing the correct "Store View" for that product.

I recently had a 1950x1950px product photo that was visible in the admin panel but not on the front of the site. Reducing it to 1600x1600px and re-uploading it caused it to be visible in both locations.

go to : /public_html/media/catalog/product
rename all the capital letters to lower case. or the oposite.

Or maybe the original uploaded images are to big! Try to keep them under 300kb.

Ensure also that your owner/group is correctly set for media files. For my server, this is apache/apache and we set the permissions like so:
$ chown -R apache:apache media/catalog/
Hope that helps someone. FYI: You might want to run Elzo's answer first to restore proper permissions then do the above.

Recently I've had PNG images not show up on the front end (they show blank not placeholder) even though they show up fine in the back-end.
Re saving them as jpegs or saving them as PNG from a different editor fixed it.

Follow below instruction
Go to 'Cache Storage Management' and click on 'Flush Magento Cache', 'Flush Cache Storage', 'Flush Catalog Images Cache' & 'Flush JavaScript/CSS Cache'
Go to 'Index Management', click on 'Select All' and then select 'Reindex Data' from drop-down and submit.
Do this process 3-4 times, then have look at front-end with CTRL+F5. Now images will show-up.
Make sure htaccess is in working mode.

Related

this webpage has a redirect loop : In magento

After updating URL Base in Magento admin form http//:www.web.com to https//:www.web.com it through error :
this webpage has a redirect loop
Tell me please why i get this error and how remove this?
If you edit the secure/unsecure base url for you Magento site you may find yourself, in a never ending loop. Perform the following steps to solve it:
Log in to your database using phpMyadmin or similar.
Find the table labelled core_config_data
Edit the rows entitled web/unsecure/base_url and
web/secure/base_url
Edit the row web/url/redirect_to_base to 0 instead of 1
Clear contents of both var/cache and
var/sessions folders.
[EDIT]
Your URL should be like http://www.web.com/ with trailing slash.
Site relocation issues:
Forgetting the trailing slash on the baseURLs
changing the rewritebase in .htaccess
check file/folder permissions and change so server can write to the
directory tree especially var/ and media/
app/etc/local.xml changes so Magento can access the new database
After fixing these things, clear Cache.
Please make sure you dont have any unwanted .xml files in /app/etc/ folder.
values in local.xml files will be overwritten by other files.
I solved this problem by setting web/cookie/cookie_lifetime in core_config_data table to 3600.
Had this problem on Magento2 after switching to https.
Check web/secure/use_in_adminhtml and web/secure/use_in_frontend settings in core_config_data, they both should be set to 1. It solved the issue for me.
delete cookies for domain, it wored for me in case of infinite 302 loops
Remove var folder from Magento root.
It has solved my problem
Clearing all cache solved my problem.

Magento product upload images are not appearing

I'm uploading products to my Magento store but products are not being displayed.
I can upload the image using the admin area and when managing my products I can see the images there, but once I go to the front end I just get the Magento logo where the product image should appear.
This has been happening since my server migration so I'm not sure if its related or not.
There are many things that could be causing this issue, but here's a few things for you to look into:
On the Product Information page in your admin backend, under 'Images', make sure the radio buttons have an image selected for 'Base Image', 'Small Image', 'Thumbnail', and that they aren't 'Excluded'
Make sure the product images exist under /media/catalog/product/ (relative to your document root)
Make sure the /media directory is in your Apache web server's group (usually 'www-data' or 'httpd'). Magento also needs to be able to write to this directory, so you can run this command to set those permissions:
sudo chmod -R 775 /path/to/magento/media
In System->Configuration->General->Web, make sure "Base Media URL" is correct under both "Secure" and "Unsecure"
Just rename .htaccess to .htaccess-old inside media directory in Magento Root Directory.
You need to do the following to get this right:
Recursively change permissions -r or via ftp set media folder to 777
Make sure your server has curl, image gd enabled and refresh magento cache
Just adding more information to help: if your SELINUX is enabled, you need additional setup. Here you can find some information http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-prereq-selinux
try this code:-
Might be you are not adding below line:-
$_product=Mage::getModel("catalog/product")->load($_product->getId());
Even though late, Hope it will help for someone
If its still not showing even after all the above tweaks. Try to reduce the size of the image to few KBs and try. It worked for Me.:)
For me the issue was php7.0-gd extension. Once I installed it image appears without a problem.
sudo apt-get install php7.0-gd
sudo service apache2 restart

Forbidden You don't have permission to access /appetitclic/wp-content/themes/Apc/img/logo.png on this server

Hello all :)
I am currently working on a WP website and a the moment I am working locally with Wampserver.
None of my pictures happen to appear on my website.
Here is the error I get when I put the image url in my browser :
Forbidden
You don't have permission to access
/appetitclic/wp-content/themes/Apc/img/logo.png on this server.
I have no problem accessing phpmyadmin and image from TewentyTwelve template work fine.
Things I have tried :
-Editing (and creating) .htaccess in wp-admin.
-Editing phpmyadmin.conf
-Puting Wamp on online mode
-Working through http://127.0.0.1/ instead of locally.
I am pretty sure the problem doesn't have to so with the code because I have access to the /appetitclic/wp-content/themes/Apc/img/ folder and I see the list of images (not working). I maybe missed one or two workarounds but I am pretty sure I tried most of the common ones.
If you need any info on my setup / configs I have tried ask away.
Thank you very much,
Cheers.
If you start your relative url with a backslash '/' that means go to the servers root folder and work up from there.
Try loosing the leading slash and see what that does.
I have that same problem when I downloaded random images for img preloading testing.
So I went to change permission from no access to read & write (if on Mac then > Get info. You shall see that permission section at the very bottom).
You might use chmod to change permission to particular users.
Hope this help.
I had the same problem today. I created a static webpage put in the html folder of my web server. It turned out that some images could not be loaded. The solution is quite simple. I just right click the image folder and changed the properties to allow readers to view the images.

Cannot upload images when WordPress is sat on a virtual host configuration

This is my first post to this Forum, please forgive me if this has been answered elsewhere--I did search and was unable to find an answer to my particular problem, so any help would be greatly appreciated.
I am working on a WP site for a client who wants to upload images to new posts (who doesn't hey?). In setting up the site I have done the following:
1) Enabled File Upload by CHMOD default dir to 777.
2) Changed max file size.
3) Changed allowed filetypes to include necessary file types.
When I try to upload anything I get the following error:
“Bobst Expertfold 80 110 (Dec 2010).jpg” has failed to upload due to an error
The uploaded file could not be moved to /var/www/vhosts/glossopcartons.com/httpdocs/wp-content/uploads/2010/12.
The above error mentions 'glossopcartons.com', this WP site is actually sat on glossopcartons.co.uk. It's obvious that there is some kind of virtual host configuration going on and the image is trying to be uploaded to a folder on a different domain (glossopcartons.com instead of glossopcartons.co.uk).
I don't manage the hosting, I have just been assigned with the build. However, I have access to the plesk cpanel but I dont know what I need to do?
Does anyone know what is causing this problem? The site has actually been made live and this issue has been spotted after the launch(everything worked fine on the test server), and I am scratching my head trying to figure it out.
Is there something I can put in my wp-config.php or .htaccess file to tell WP to upload to a different location.
Any help would be greatly appreciated.
Dan
First thing is 777 permisions are too loose and will get you hacked; they should be no more than 755. Hardening WordPress « WordPress Codex
For the difference in URLs: that sounds like a DNS or virtual host config, but try adding the full URL path in Settings>>Media Settings. Might not work.
Why are there sites at both domains? Why not domain forward glossopcartons.com to glossopcartons.co.uk?
Make sure PHP lets you upload files larger than what you are trying to upload.
Experienced the same problem on several old sites. This problem occurs sporadically and is not commonly occuring on other websites on the same server
Try going to your "Media Settings" page... do you see a "Store uploads in this folder" option with a long path to your uploads folder? If so... this is your problem... WordPress 3.5+ does not seem to require this long path, but more of a site relative path (which is great!)
Change your "Store uploads in this folder" to "wp-content/uploads"... when you "save settings" you should see that field disapear entirely, never to bother us again ;-)
This occured for me when my hosting provider changed the folder structure on the server making this long URL incorrect. Therefore WordPress could not find the "uploads" directory at all.
Hope that helps...
Here's some things you might want to check in case your still having problems...
Update to WordPress 3.5 +
Update all plugins
Check file permissions 755 on the uploads dir/
Check PHP version

Product images not showing after migration of magento website

I recently migrated my magento website to a different server, and here's the process I used:
made a dump of the database.
copied all the system files from the FTP to my hard drive.
emptied the VAR folder
emptied the media cache folders
replaced the strings in the SQL dump from http://www.oldsite.com to http://www.newsite.com
restored the database on the new server
modified the local.xml file to suit the new database host, login and password.
uploaded the system files to the new server
Everything seems to work fine, except for the fact that the product images are not being displayed on the frontend for some reason.
For example, here's a path from an image that was supposed to be showing, which I got through firebug:
http://www.newsite.com/media/catalog/product/cache/1/small_image/113x113/9df78eab33525d08d6e5fb8d27136e95/1/_/1_9.jpg
When I search for the path of the image the site is supposed to show in the FTP, the file is actually there. I can download it and display it on my computer. I don't know why this is happening. It doesn't make any sense to me.
This /media/catalog/product/cache/ was generated by the system, because I erased it myself before uploading the site, so I guess it isn't a cache related issue.
Well, I described the issue the best I could. I hope you can help me out.
EDIT:
Hmm, it turns out the problem was the .htaccess file inside the media folder! Removed the file -> Problem solved!
Just in case anyone else has the same problem, removing the .htaccess in the media folder did the trick. I don't know if that's the best possible solution though! Thanks!
Change Options All -Indexes to Options -Indexes in the above mentioned .htaccess file.
copied all the system files from the FTP to my hard drive.
This one makes me a bit suspecting. Magento has case-sensitive folders in the media folder. There would be, for instance, an 'a' folder and an 'A' folder in the same location.
If you downloaded your files unarchived (file by file) via FTP to a Windows machine, this would cause a conflict and would omit up to half your images.
Ok, since everything checked out with the base URL, my next suggestion is a migration path option if you have cPanel on the old server, and since most do, this should help:
Create a full backup of the account using cPanel. This will create a tar.gz of the entire account.
Download the tarred backup to your computer and unzip.
Find home_dir.tar - this is what contains your HTML root information. You can either upload this directly to the server and untar there using SSH, or do it on your local computer and upload.
Find the SQL folder in the untarred backup. There should be a dump of your database there. Use source to put that information into a new database.
On the server, delete use_cache.ser and change config information for the new database.
Your .htaccess should have come over in the home_dir.tar, but make sure that it's correct per our other question
Once that's done, you should be fully functional, unless you need to make changes in the database base_url for the new server.
Images not showing in Magento 1.7 to 1.9 upgrade:
My solution:
in /media/.htaccess
fixed options syntax:
# Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes
Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes
removed these. Maybe conflict with .htaccess in site root directory??
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
# Options +SymLinksIfOwnerMatch
# RewriteEngie on
also changed ownership of .htaccess to apache
chown apache:apache /var/www/mystore/media/.htaccess
Would like opinion of why these may be causing 500 errors.
php bin/magento catalog:images:resize
This helped me, but it take's a lot of time to complete
for magento 2.4.5
in pub//media/.htaccess
change „FollowSymLinks“ to „SymLinksIfOwnerMatch“. example:
############################################
enable rewrites
Options +SymLinksIfOwnerMatch
RewriteEngine on
## you can put here your pub/media folder path relative to web root
#RewriteBase /magento/pub/media/
############################################

Resources