Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 739845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:26:50+00:00 2026-05-14T08:26:50+00:00

A common issue when building Content Management Systems for end-users using WYSIWYG Editors like

  • 0

A common issue when building Content Management Systems for end-users using WYSIWYG Editors like CKEditor is that users can upload images within the editor, embed them, and then resize them.

After saving the content, the embedded (original) image URLs need to be replaced by their properly resized counterparts. Imagine a 3000 x 3000 photograph uploaded by a user, manually resized in the WYSIWYG editor to 300 x 300 Pixels – it needs to be resized automatically to prevent a huge source file from being loaded.

The task is pretty straightforward, and I’ve implemented it a number of times (albeit with regular expressions, which is why I’m looking for a replacement 🙂 – walk through the DOM, search for images, see whether the size of the image source file differs from that specified in the img tag and if it does, replace the original image by an automatically resized one.

There are a few small quirks along the way (some WYWSIYG editors prefer to use width="300", others the width: 300px CSS version etc.).

My question is, is there a ready-made, high-quality PHP solution that does this well, and takes the quirks into account?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:26:51+00:00Added an answer on May 14, 2026 at 8:26 am

    Try use this image resizer: http://shiftingpixel.com/2008/03/03/smart-image-resizer/

    I’ve use this in my development, you can upload your image file and generate cache file based on whatever size or cropped portion for optimal performance without actually change your original image file.

    example:

    <img src="/image.php/coffee-bean.jpg?width=200&amp;height=200&amp;image=/wp-content/uploads/2008/03/coffee-bean.jpg" alt="Coffee Bean" />
    

    you can download the image.php file at the site i mentioned above and pass the targetted image name as parameters into the image.php file and then it will generate cache file for it, please make sure your image folder permission is ready for execution and alteration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A common argument against using .NET for high volume, transactional enterprise systems is that
A quick Google search of this issue shows it's common, I just can't for
This seems like it would be a common issue to be but I don't
As the question says, what are some common/major issues that C++ programmers face when
Common question but I could use an english explanation. Is it like Java where
A common pattern in C++ is to create a class that wraps a lock
With common lisp and I am assuming the introspection properties. How can I add
I am currently building a small web application for publishing stories using PHP and
A common issue automake complains about is caused by following lines in various Makefile.am:s
I am building a page that is employing several different javascript elements and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.