in Education by
I will be using Wordpress as a CMS with custom post types. Each "post" is a product and will have 20-60 images in 3 different sizes (60-180 total images per product). What's the best way to link the images to the post? I'm thinking about storing them on Amazon S3 and recording the URLs in custom meta tags, but I want to make sure I do it in a way that its easy to retrieve. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The WordPress has a built-in media library which has hooks that relate images to specific posts (products in your case). Given that a solid API exists for this, you may want to start there. Helpful functions to look into are: wp_insert_attachment wp_delete_attachment wp_get_attachment_image_src wp_get_attachment_metadata Update: To be more specific for this project, also be sure to look into add_image_size which allows you to define various thumbnail sizes which your posts can use. In other words, upload one large image and WP will automatically generate the rest. Mark J. of the WP team made a good writeup of the feature back wen 2.9 was released. As for the S3, that definitely isn't a bad idea either, but keep WP as being your core source of data. Perhaps you can use a back-end process to move them to S3 and then update the attachment's metadata. When you render the post, check to see if a S3 URI exists, otherwise default to a local image. (Disclosure: I'm not very familiar w/S3; but this is how I would start my quest.)

Related questions

0 votes
    I am facing an wiered problem while adding new Page in the wordpress. Steps: Create a new page with ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    Is it possible to tell Wordpress to show the_post_thumbnail() without the proportion rate. I need what the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I have created a custom post type in wordpress called videos. When the admin adds a video he also ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    I have laravel website and there is blog folder which contain wordpress blog. In my htaccess I want some ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I'm using the new wordpress custom post types and fields. It's all working great, but for a custom image field (where ... below, the final code for anybody who needs it is this:...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I'm using the new wordpress custom post types and fields. It's all working great, but for a custom image field (where ... below, the final code for anybody who needs it is this:...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    How many types of custom Reports in Google Analytics?...
asked Oct 3, 2020 in Technology by JackTerrance
0 votes
    I have a code that generates new image every time user moves slider a little and adds it to sublayer ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I have a code that generates new image every time user moves slider a little and adds it to sublayer ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
     (also known community and clubs) is a feature provided by many social network services which helps us ... their own interest Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
     .. (also known community and clubs) is a feature provided by many social network services which helps ... their own interest Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    How to insert different types of slides and images into the slides and apply animation and transition on them Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    What are the types of custom settings in Salesforce? What is the advantage of using custom settings?...
asked Nov 11, 2020 in Technology by JackTerrance
0 votes
    I am using wordpress, and some pages are using page-template, which is almost full HTML without . Now ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I'm hosting a wordpress site on ec2 and I'm trying to update my theme through the admin screen. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
...