Jump to content

Gallery Help, Please


Recommended Posts

Hi everyone.

I really need some help. I have pretty much zero knowledge of PHP. A friend made a gallery code for my website, which has an admin allowing you to upload photos. I have almost finished the website but have now found that the gallery loads all of the images of each page (the size of the full photo 200kb) even for the thumbnails. I am going to be having undreds of photos and realise that this is not feasable!

 

Could anyone please help me edit the script so that it creates 2 files from the uploaded file, it keeps the original, but also makes a very small file that would be used as just the thumbnail.

 

With this gallery it uses the lightbox opening.

 

I can send or post any scripts. The gallery runs of a simple mySQL database.

 

Thanks to anyone that has any help :)

 

Regards

Chris

Link to comment
Share on other sites

oops okay, will do

 

This the is the file image_gallery.php

<?php 
require_once 'header2.php';
$time_stamp = date("d.m.Y");
$date = $time_stamp;
?>
<tr><td><table align="center">
<?php
/////////////////////////////////////////////////////////////
if(isset($_GET['image_cat']))
{
$cater = $_GET['image_cat'];
$_SESSION['image_cat'] = $cater;
$query = "SELECT sub_cat FROM `sub_cat` WHERE `parent_cat` = '{$cater}'";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><div id="image_gal"><a href="image_gallery.php">Galleries</a> > <?php echo $cater;?></div></td></tr>
<tr><td><table width="0" align="center">
  <tr><td><tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
           echo "<tr>"; // break the line
     }
$car = $row['sub_cat'];	  
$sql = "SELECT * FROM image_gallery WHERE `sub_folder`='{$car}' ORDER BY RAND() LIMIT 1";
$reslt = mysql_query($sql) or die ("Error:" . mysql_error());
$rw = mysql_fetch_assoc($reslt);

	?><td class="style8"><b><?php echo $row['sub_cat']; ?></b></font><br><a href="?image_subcat=<?php echo $row['sub_cat']; ?>"><img width="165px" src="<?php echo $rw['image_link']; ?>"></a></td><td>    </td>
	<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr></table></td></tr>
<?php
if (mysql_num_rows($result) < 1) 
{
echo "<tr><td>No Images Yet.</td></tr><tr><td>Keep Checking Back</td></tr>";
}
require_once 'footer.php';
exit();
}
/////////////////////////////////////////////////////////////
if(isset($_GET['image_subcat'])) // If the URL ends in ?image_cat do everything in the brakets
{
$sub_cat = $_GET['image_subcat'];
$query = "SELECT folder_name,image_link,image_id,image_name,sub_folder FROM `image_gallery` WHERE `sub_folder` = '{$sub_cat}' ORDER BY image_id ASC";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><div id="image_gal"><a href="image_gallery.php">Galleries</a> > <a href="?image_cat=<?php echo $_SESSION['image_cat'];?>"><?php echo $_SESSION['image_cat'];?></a> > <?php echo $sub_cat;?></div></td></tr>
<tr><td><table align="center"><tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
          echo "</tr><tr><td> </td></tr><tr>"; // break the line
     }

?><td><a href="<?php echo $row['image_link']; ?>" rel="lightbox [main]" title="<?php echo $row['image_name']; ?>" ><img width="165px" src="<?php echo $row['image_link']; ?>"></a><br><?php echo $row['image_name']; ?></td>
<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr></table></td></tr>
<?php
require_once 'footer.php';
exit();
}
/////////////////////////////////////////////////////////////
//No ID passed to page, display user list:
?>
<table width="100%" bgcolor="#e5e5e5" id="1">
<tr>
  <td width="2%"> </td>
<td width="98%" height="30" class="style4"><div align="left">Galleries</div>
    </font></td>
</tr>
<tr>
  <td> </td>
  <td class="style6"><div align="left">Please choose a gallery below, and use the in-gallery navagation to take a look around.</div>
    </font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> </td>
  </tr>
</table>
<?php
$query = "SELECT catergory,image_link FROM `image_catergory` ORDER BY catergory ASC";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><table align="center">
<tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
           echo "</tr><tr>"; // break the line
     }
$car = $row['catergory'];	  
$sql = "SELECT * FROM image_gallery WHERE `folder_name`='{$car}' ORDER BY RAND() LIMIT 1";
$reslt = mysql_query($sql) or die ("Error:" . mysql_error());
$rw = mysql_fetch_assoc($reslt);

	?><td><a href="?image_cat=<?php echo $row['catergory']; ?>" class="style4>"<b><?php echo $row['catergory']; ?></b></font><br><img width="170px" src="<?php echo $rw['image_link']; ?>"></a></td><td>    </td>
	<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr><table>
<?php
if (mysql_num_rows($result) < 1) 
{
echo "<tr><ts>No Images Yet.</td></tr><tr><td>Keep Checking Back</td></tr>";
}
if($_SESSION['log_in'] == true)
{
?>
<?php
} 
require_once 'footer.php';
?>

 

This is the code for the page upload.php

<?php
require_once 'header2.php';
if($_SESSION['log_in'] == true)
{
?>
<table align="center">
  <?php
$time_stamp = date("d.m.Y");
$date = $time_stamp;
if(isset($_POST['next']))
{
$folder_name = $_POST['folder'];
header("Location:?cat=".$folder_name);
}
if(isset($_GET['cat']))
{
	if(isset($_POST['upload']))
	{
	$folder = $_GET['cat'];
	$target = "images/";
	$name = mysql_real_escape_string($_FILES['uploaded']['name']);
	$extension = substr($name, strrpos($name, "."), strlen($name));
	$image = $target.$name;
	$sub_folder = $_POST['subfolder'];
	$imagename = mysql_real_escape_string($_POST['imagename']);
	$target = $target . basename( $_FILES['uploaded']['name']) ; 
	$ok=1;

		//This is our size condition
		if ($uploaded_size > 512000)
		{
		?>
  <tr>
    <td class="style10">Your file is too large.</td>
  </tr>
  <?php
		$ok=0;
		}

		//This is our limit file type condition
		if ($uploaded_type =="text/php")
		{
		?>
  <tr>
    <td class="style10">No PHP files</td>
  </tr>
  <?php
		$ok=0;
		}

		//Here we check that $ok was not set to 0 by an error
		if ($ok==0)
		{
		?>
  <tr>
    <td class="style10">Sorry your file was not uploaded</td>
  </tr>
  <?php
		}

		if($user_check >= 1)
		{
		?>
  <tr>
    <td class="style10"><?php echo $imagename;?> already exists, please rename it.</td>
  </tr>
  <?php
		}

		if(!$imagename)
		{
		?>
  <tr>
    <td class="style10">Please Enter A Name</td>
  </tr>
  <?php
		}		
		if(!$folder_name)
		{
		?>
  <tr>
    <td><?php
		}
		//If everything is ok we try to upload it
	if(isset($imagename))  
		{
		mysql_query("INSERT INTO `image_gallery` (image_link, img_time, folder_name, image_name, image_id, filename,sub_folder) VALUES
		( '$image','$date','$folder','$imagename','','$name','$sub_folder')")
		or die('Error ' . mysql_error());
		mysql_query(" UPDATE `sub_cat` SET imagelink = '{$image}' AND parent_cat ='{$folder}' WHERE `sub_cat`='{$sub_folder}'")
		or die('Error ' . mysql_error());
		mysql_query(" UPDATE `image_catergory` SET image_link = '{$image}' WHERE `catergory`='{$folder}'")
		or die('Error ' . mysql_error());
			if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
			{
			?>
    </td>
  </tr>
  <tr>
    <td class="style10">The file <?php echo $image;?> has been uploaded</td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <?php
			}
			else
			{
			echo "<tr><td>Sorry, there was a problem uploading your file.</td></tr>";
			} 
		}
	}
$foldername= $_GET['cat'];
	?>
  <form enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
    <tr>
      <td><div align="right"><span class="style7">Image Name:</span></div></td>
      <td><div align="left">
        <input name="imagename" type="text" size="25" maxlength="200" />
      </div></td>
    </tr>
    <tr>
      <td><div align="right"><span class="style7">Please choose a file: </span></div></td>
      <td><input name="uploaded" type="file" size="25" /></td>
    </tr>
    <tr>
      <td><span class="style7">
        <div align="right">Sub-Gallery:</div>
      </span></td>
      <td><div align="left">
        <?php
	$quey = "SELECT sub_cat FROM `sub_cat` WHERE parent_cat = '{$foldername}'";
	$reult = mysql_query($quey) or die("Error:" . mysql_error());
	?>
        <select name='subfolder'>
          <?php
if (mysql_num_rows($reult) > 0) 
{

	while ($ow = mysql_fetch_assoc($reult)) {
	echo "<option>".$ow['sub_cat']."</option>";
	}
}
?>
        </select>
      </div></td>
    </tr>
    <tr>
      <td><div align="right">
        <input type="submit" name="upload" value="Upload" />
      </div></td>
    </tr>
  </form>
</table>
</form>
</form>
<?php
	if(mysql_num_rows($reult) < 1)
	{
	echo "<tr><td><a href='".$_SERVER['HTTP_HOST']."/add_catagories.php'>Add Catergory</a></td></tr>";
	}
}
else
{
?>
<tr>
<td>
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
  <div align="center">
    <table width="266" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30"><div align="center" <span class="style7">Choose Gallery:</span></div></td>
      </tr>
      <tr>
        <td height="30"><div align="center">
          <?php
	$query = "SELECT catergory FROM `image_catergory`";
	$result = mysql_query($query) or die("Error:" . mysql_error());
	?>
          <select name='folder'>
            <?php
if (mysql_num_rows($result) > 0) 
{

	while ($row = mysql_fetch_assoc($result)) {
	echo "<option>".$row['catergory']."</option>";
	}
}
?>
          </select>
        </div></td>
      </tr>
      <tr>
        <td height="30">
          <div align="center">
            <input type="submit" value="Next!" name="next" />
            <?php
}
}
else
{
require_once 'pass.php';
}
?>
        </div></td>
      </tr>
    </table>
  </div>
</form> 
<?php
require_once 'footer2.php';
?>   

 

The database consists of:

image_catergory

Catergory

image_link

 

image_gallery

image_id

folder_name

image_name

img_time

image_link

filename

sub_folder

 

sub_cat

sub_cat

imagelink

parent_cat

 

I hope this helps, if anyone needs anything more, let me know :)

 

Link to comment
Share on other sites

you need to find this part of the code in the upload file page: Right after this is where you add the code.

 

if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))

{

---------------------------------------

This will create a thumbnail image, however you will need to edit $thumbpath so that it points to your directory where the thunbnails reside. This will not add anything to your DB. The thumbnail will be the same name as the original, but reside in a differnet folder. The thumbnail is only set for 100px wide with proportional height. If you want a differnet size, this will have to be edited as well.

---------------------------------------------

$imgpath = $image;

$thumbpath = $_SERVER['DOCUMENT_ROOT'] . "/thumbs/" . $_FILES['uploaded']['name'];

 

$img = imagecreatefromjpeg($imgpath);

 

list($imgwidth,$imgheight) = getimagesize($imgpath);

 

//edit this section to change image width,height

$flagwidth = 100;

$percent = round(($flagwidth/$imgwidth) * 100) * .01;

$newimgwidth = $imgwidth * $percent;

$newimgheight = $imgheight * $percent;

//end section

 

$newimage = imagecreatetruecolor($newimgwidth, $newimgheight);

 

imagecopyresampled($newimage, $img,0,0,0,0,$newimgwidth, $newimgheight,

$imgwidth, $imgheight);

 

imagejpeg($newimage, $thumbpath,100);

Link to comment
Share on other sites

Thankyou for the code, but it doesnt seem to work. I have placed it in the code, and have edited the location, setting up a new folder within the images folder, thumbs. I added a thumbnail images into this folder and uploaded the full size through the upload page. It still displays the full size image as the thumbnail.

 

Here is the code

 

<?php
require_once 'header2.php';
if($_SESSION['log_in'] == true)
{
?>
<table align="center">
  <?php
$time_stamp = date("d.m.Y");
$date = $time_stamp;
if(isset($_POST['next']))
{
$folder_name = $_POST['folder'];
header("Location:?cat=".$folder_name);
}
if(isset($_GET['cat']))
{
	if(isset($_POST['upload']))
	{
	$folder = $_GET['cat'];
	$target = "images/";
	$name = mysql_real_escape_string($_FILES['uploaded']['name']);
	$extension = substr($name, strrpos($name, "."), strlen($name));
	$image = $target.$name;
	$sub_folder = $_POST['subfolder'];
	$imagename = mysql_real_escape_string($_POST['imagename']);
	$target = $target . basename( $_FILES['uploaded']['name']) ; 
	$ok=1;

		//This is our size condition
		if ($uploaded_size > 512000)
		{
		?>
  <tr>
    <td class="style10">Your file is too large.</td>
  </tr>
  <?php
		$ok=0;
		}

		//This is our limit file type condition
		if ($uploaded_type =="text/php")
		{
		?>
  <tr>
    <td class="style10">No PHP files</td>
  </tr>
  <?php
		$ok=0;
		}

		//Here we check that $ok was not set to 0 by an error
		if ($ok==0)
		{
		?>
  <tr>
    <td class="style10">Sorry your file was not uploaded</td>
  </tr>
  <?php
		}

		if($user_check >= 1)
		{
		?>
  <tr>
    <td class="style10"><?php echo $imagename;?> already exists, please rename it.</td>
  </tr>
  <?php
		}

		if(!$imagename)
		{
		?>
  <tr>
    <td class="style10">Please Enter A Name</td>
  </tr>
  <?php
		}		
		if(!$folder_name)
		{
		?>
  <tr>
    <td><?php
		}
		//If everything is ok we try to upload it
	if(isset($imagename))  
		{
		mysql_query("INSERT INTO `image_gallery` (image_link, img_time, folder_name, image_name, image_id, filename,sub_folder) VALUES
		( '$image','$date','$folder','$imagename','','$name','$sub_folder')")
		or die('Error ' . mysql_error());
		mysql_query(" UPDATE `sub_cat` SET imagelink = '{$image}' AND parent_cat ='{$folder}' WHERE `sub_cat`='{$sub_folder}'")
		or die('Error ' . mysql_error());
		mysql_query(" UPDATE `image_catergory` SET image_link = '{$image}' WHERE `catergory`='{$folder}'")
		or die('Error ' . mysql_error());
			if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
			{
			$imgpath = $image;
$thumbpath = $_SERVER['DOCUMENT_ROOT'] . "/images/thumbs/" . $_FILES['uploaded']['name'];

$img = imagecreatefromjpeg($imgpath);

list($imgwidth,$imgheight) = getimagesize($imgpath);

//edit this section to change image width,height
$flagwidth = 100;
$percent = round(($flagwidth/$imgwidth) * 100) * .01;
$newimgwidth = $imgwidth * $percent;
$newimgheight = $imgheight * $percent;
//end section

$newimage = imagecreatetruecolor($newimgwidth, $newimgheight);

imagecopyresampled($newimage, $img,0,0,0,0,$newimgwidth, $newimgheight,
$imgwidth, $imgheight);

imagejpeg($newimage, $thumbpath,100);
			?>
    </td>
  </tr>
  <tr>
    <td class="style10">The file <?php echo $image;?> has been uploaded</td>
  </tr>
  <tr>
    <td></td>
  </tr>
  <?php
			}
			else
			{
			echo "<tr><td>Sorry, there was a problem uploading your file.</td></tr>";
			} 
		}
	}
$foldername= $_GET['cat'];
	?>
  <form enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
    <tr>
      <td><div align="right"><span class="style7">Image Name:</span></div></td>
      <td><div align="left">
        <input name="imagename" type="text" size="25" maxlength="200" />
      </div></td>
    </tr>
    <tr>
      <td><div align="right"><span class="style7">Please choose a file: </span></div></td>
      <td><input name="uploaded" type="file" size="25" /></td>
    </tr>
    <tr>
      <td><span class="style7">
        <div align="right">Sub-Gallery:</div>
      </span></td>
      <td><div align="left">
        <?php
	$quey = "SELECT sub_cat FROM `sub_cat` WHERE parent_cat = '{$foldername}'";
	$reult = mysql_query($quey) or die("Error:" . mysql_error());
	?>
        <select name='subfolder'>
          <?php
if (mysql_num_rows($reult) > 0) 
{

	while ($ow = mysql_fetch_assoc($reult)) {
	echo "<option>".$ow['sub_cat']."</option>";
	}
}
?>
        </select>
      </div></td>
    </tr>
    <tr>
      <td><div align="right">
        <input type="submit" name="upload" value="Upload" />
      </div></td>
    </tr>
  </form>
</table>
</form>
</form>
<?php
	if(mysql_num_rows($reult) < 1)
	{
	echo "<tr><td><a href='".$_SERVER['HTTP_HOST']."/add_catagories.php'>Add Catergory</a></td></tr>";
	}
}
else
{
?>
<tr>
<td>
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
  <div align="center">
    <table width="266" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30"><div align="center" <span class="style7">Choose Gallery:</span></div></td>
      </tr>
      <tr>
        <td height="30"><div align="center">
          <?php
	$query = "SELECT catergory FROM `image_catergory`";
	$result = mysql_query($query) or die("Error:" . mysql_error());
	?>
          <select name='folder'>
            <?php
if (mysql_num_rows($result) > 0) 
{

	while ($row = mysql_fetch_assoc($result)) {
	echo "<option>".$row['catergory']."</option>";
	}
}
?>
          </select>
        </div></td>
      </tr>
      <tr>
        <td height="30">
          <div align="center">
            <input type="submit" value="Next!" name="next" />
            <?php
}
}
else
{
require_once 'pass.php';
}
?>
        </div></td>
      </tr>
    </table>
  </div>
</form> 
<?php
require_once 'footer2.php';
?>   	

Link to comment
Share on other sites

I cant see anywhere in the code at which I could do this

 

Here is the code

 

<?php 
require_once 'header2.php';
$time_stamp = date("d.m.Y");
$date = $time_stamp;
?>
<tr><td><table align="center">
<?php
/////////////////////////////////////////////////////////////
if(isset($_GET['image_cat']))
{
$cater = $_GET['image_cat'];
$_SESSION['image_cat'] = $cater;
$query = "SELECT sub_cat FROM `sub_cat` WHERE `parent_cat` = '{$cater}'";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><div id="image_gal"><a href="image_gallery.php">Galleries</a> > <?php echo $cater;?></div></td></tr>
<tr><td><table width="0" align="center">
  <tr><td><tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
           echo "<tr>"; // break the line
     }
$car = $row['sub_cat'];	  
$sql = "SELECT * FROM image_gallery WHERE `sub_folder`='{$car}' ORDER BY RAND() LIMIT 1";
$reslt = mysql_query($sql) or die ("Error:" . mysql_error());
$rw = mysql_fetch_assoc($reslt);

	?><td class="style8"><b><?php echo $row['sub_cat']; ?></b></font><br><a href="?image_subcat=<?php echo $row['sub_cat']; ?>"><img width="165px" src="<?php echo $rw['image_link']; ?>"></a></td><td>    </td>
	<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr></table></td></tr>
<?php
if (mysql_num_rows($result) < 1) 
{
echo "<tr><td>No Images Yet.</td></tr><tr><td>Keep Checking Back</td></tr>";
}
require_once 'footer.php';
exit();
}
/////////////////////////////////////////////////////////////
if(isset($_GET['image_subcat'])) // If the URL ends in ?image_cat do everything in the brakets
{
$sub_cat = $_GET['image_subcat'];
$query = "SELECT folder_name,image_link,image_id,image_name,sub_folder FROM `image_gallery` WHERE `sub_folder` = '{$sub_cat}' ORDER BY image_id ASC";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><div id="image_gal"><a href="image_gallery.php">Galleries</a> > <a href="?image_cat=<?php echo $_SESSION['image_cat'];?>"><?php echo $_SESSION['image_cat'];?></a> > <?php echo $sub_cat;?></div></td></tr>
<tr><td><table align="center"><tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
          echo "</tr><tr><td> </td></tr><tr>"; // break the line
     }

?><td><a href="<?php echo $row['image_link']; ?>" rel="lightbox [main]" title="<?php echo $row['image_name']; ?>" ><img width="165px" src="<?php echo $row['image_link']; ?>"></a><br><?php echo $row['image_name']; ?></td>
<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr></table></td></tr>
<?php
require_once 'footer.php';
exit();
}
/////////////////////////////////////////////////////////////
//No ID passed to page, display user list:
?>
<table width="100%" bgcolor="#e5e5e5" id="1">
<tr>
  <td width="2%"> </td>
<td width="98%" height="30" class="style4"><div align="left">Galleries</div>
    </font></td>
</tr>
<tr>
  <td> </td>
  <td class="style6"><div align="left">Please choose a gallery below, and use the in-gallery navagation to take a look around.</div>
    </font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> </td>
  </tr>
</table>
<?php
$query = "SELECT catergory,image_link FROM `image_catergory` ORDER BY catergory ASC";
$result = mysql_query($query) or die("Error:" . mysql_error());
$i = 0;
?>
<tr><td><table align="center">
<tr>
<?php
while ($row = mysql_fetch_assoc($result))  {
     if ($i == 3) {
          $i = 0; // reset variable
           echo "</tr><tr>"; // break the line
     }
$car = $row['catergory'];	  
$sql = "SELECT * FROM image_gallery WHERE `folder_name`='{$car}' ORDER BY RAND() LIMIT 1";
$reslt = mysql_query($sql) or die ("Error:" . mysql_error());
$rw = mysql_fetch_assoc($reslt);

	?><td><a href="?image_cat=<?php echo $row['catergory']; ?>" class="style4>"<b><?php echo $row['catergory']; ?></b></font><br><img width="170px" src="<?php echo $rw['image_link']; ?>"></a></td><td>    </td>
	<?php

     $i++; // increase $i each time through the loop
}
?>
</td></tr><tr><td> </td></tr><table>
<?php
if (mysql_num_rows($result) < 1) 
{
echo "<tr><ts>No Images Yet.</td></tr><tr><td>Keep Checking Back</td></tr>";
}
if($_SESSION['log_in'] == true)
{
?>
<?php
} 
require_once 'footer.php';
?>

 

Any help is much appreciated

 

Link to comment
Share on other sites

image_link value in your DB holds that information. Every one of the files in your database is set to your main images forlder. You're going to have to write some code to go through your database and make thumbnails for all of your images which currently have none. You need to then run through the DB and change all of values of image_link  to point to your thumbnails directory.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.