- Posts: 15
COMMUNITY FORUM
Image SEO
- Trond
-
Topic Author
- Offline
- New Member
Less
More
15 years 6 months ago #74776
by Trond
Oslo, Norway.
Image SEO was created by Trond
Hi there!
For different SEO purposes I would like to control the image name, image locations, Image Alt descriptions and Image Titles.
Regarding the image locations I would like to differentiate (choose the location of each image) the locations or article.
Explanation (article view):
The "Pug Dog" image goes in the animalmate.com/dog/dog-breeds/pug-dog/pug-dog-jpg
The "Hamster" image goes in the animalmate.com/small-pets/hamster/hamster.jpg
Explanation (category & front page view):
The "Pug Dog" image goes in the animalmate.com/resized/dog/dog-breeds/pug-dog/pug-dog-jpg
The "Hamster" image goes in the animalmate.com/resized/small-pets/hamster/hamster.jpg
The Image Alt Descriptions and Titles must always be "Pug Dog" and "Hamster".
Is this possible?
For different SEO purposes I would like to control the image name, image locations, Image Alt descriptions and Image Titles.
Regarding the image locations I would like to differentiate (choose the location of each image) the locations or article.
Explanation (article view):
The "Pug Dog" image goes in the animalmate.com/dog/dog-breeds/pug-dog/pug-dog-jpg
The "Hamster" image goes in the animalmate.com/small-pets/hamster/hamster.jpg
Explanation (category & front page view):
The "Pug Dog" image goes in the animalmate.com/resized/dog/dog-breeds/pug-dog/pug-dog-jpg
The "Hamster" image goes in the animalmate.com/resized/small-pets/hamster/hamster.jpg
The Image Alt Descriptions and Titles must always be "Pug Dog" and "Hamster".
Is this possible?
Oslo, Norway.
Please Log in or Create an account to join the conversation.
- Trond
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- ANdrew
-
- Offline
- New Member
Less
More
- Posts: 14
15 years 2 months ago #74778
by ANdrew
Replied by ANdrew on topic Image SEO
Its a shame this seems to have baffled folks as I would be very interested in finding a solution to this.
I am guessing it would take quite a hefty back end change of the way that the code is generated for each uploaded image. I am currently trying a few ideas oiut, if I have any joy I will let you know. But Don;t hold ya breath as I am a newbie at this.
If you find anything out, please let me know.
Trond said:Anyone?
I am guessing it would take quite a hefty back end change of the way that the code is generated for each uploaded image. I am currently trying a few ideas oiut, if I have any joy I will let you know. But Don;t hold ya breath as I am a newbie at this.
If you find anything out, please let me know.
Trond said:Anyone?
Please Log in or Create an account to join the conversation.
- bkemler
-
- Offline
- Premium Member
Less
More
- Posts: 87
15 years 2 months ago #74779
by bkemler
Replied by bkemler on topic Image SEO
For me, it's not so much baffled and more that I don't understand the question... I'm guessing English isn't Trond's first language...?
Please Log in or Create an account to join the conversation.
- Hilary Cheyne
-
- Offline
- New Member
Less
More
- Posts: 9
15 years 2 months ago #74780
by Hilary Cheyne
Replied by Hilary Cheyne on topic Image SEO
Not quite sure what you mean but with the main article image there only needs to be one image that is resized 'on the fly' rather than having to upload different sizes in different locations. Within articles you can at least use the title and alt that you wish. I use JCE Advanced Image Manager - a small fee but worth it!
Please Log in or Create an account to join the conversation.
- Matt Kaufmann
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 9 months ago #74781
by Matt Kaufmann
Replied by Matt Kaufmann on topic Image SEO
I'm looking for a similar solution. I'd like K2 to leave the image in the directory in which the original image exists and I'd like it to generate different sized files in the directory of the original image based on the original file name by appending a suffix to the file name (_XS.jpg, _S.jpg, _M.jpg, etc.). I'd like it to stop generating random file names.
It looks like the following lines of code designate the image path and generate file names through the use of md5. These lines in components/com_k2/models/item.php clued me in:
There are also similar entries in components/com_k2/models/itemlist.php but there may be other files which contain references to this directory.
It would be easy enough to change the path by finding all references to it in which K2 either creates the image files or calls the image files. However, this doesn't allow us to separate the files into subdirectories and it doesn't allow us to keep the original file names.
Anyone else care to share some insight?
It looks like the following lines of code designate the image path and generate file names through the use of md5. These lines in components/com_k2/models/item.php clued me in:
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_XS.jpg'))
$item->imageXSmall = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_XS.jpg';
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_S.jpg'))
$item->imageSmall = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_S.jpg';
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_M.jpg'))
$item->imageMedium = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_M.jpg';
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_L.jpg'))
$item->imageLarge = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_L.jpg';
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_XL.jpg'))
$item->imageXLarge = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_XL.jpg';
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_Generic.jpg'))
$item->imageGeneric = JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_Generic.jpg';
There are also similar entries in components/com_k2/models/itemlist.php but there may be other files which contain references to this directory.
It would be easy enough to change the path by finding all references to it in which K2 either creates the image files or calls the image files. However, this doesn't allow us to separate the files into subdirectories and it doesn't allow us to keep the original file names.
Anyone else care to share some insight?
Please Log in or Create an account to join the conversation.
- Markus Amanto
-
- Offline
- New Member
Less
More
- Posts: 7
14 years 2 months ago #74782
by Markus Amanto
Replied by Markus Amanto on topic Image SEO
I was looking for a similar solution and posted a reply on this thread about it:
Where K2 store articles images in database?
Where K2 store articles images in database?
Please Log in or Create an account to join the conversation.